Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[15.0][ADD] contract_sale_generation_merge: New module contract_sale_generation_merge #1196

Open
wants to merge 1 commit into
base: 15.0
Choose a base branch
from

Conversation

ppyczko
Copy link

@ppyczko ppyczko commented Feb 17, 2025

This module extends contract sale generation by merging contract lines into an existing sale order within the same commitment (delivery) date.

cc https://github.com/APSL 166288

@miquelalzanillas @lbarry-apsl @mpascuall @peluko00 @javierobcn @BernatObrador please review

@ppyczko ppyczko force-pushed the 15.0-add-contract_sale_generation_merge branch from fc0c764 to cd434cc Compare February 17, 2025 10:20
@ppyczko ppyczko marked this pull request as ready for review February 17, 2025 10:27
Copy link

@mpascuall mpascuall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, tested in runboat

Copy link

@BernatObrador BernatObrador left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, code reivew and tested in runboat

@rousseldenis rousseldenis added this to the 15.0 milestone Feb 18, 2025
self._add_contract_lines(existing_sale)
sale_orders |= existing_sale
else:
sale_orders |= self.env["sale.order"].create(sale_values)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can create a list of sale values and call create() once instead.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thank you!

@ppyczko ppyczko force-pushed the 15.0-add-contract_sale_generation_merge branch from cd434cc to b21ed36 Compare February 18, 2025 10:05
Copy link
Member

@lbarry-apsl lbarry-apsl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revised code and runboat, LGTM

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants