-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[10.0] [ADD] sale_procurement_group_by_requested_date #541
[10.0] [ADD] sale_procurement_group_by_requested_date #541
Conversation
@aheficent Could you please review. |
req_date = fields.Date.to_string(req_datetime) | ||
if line._get_procurement_group_key()[0] == 12: | ||
if line.requested_date: | ||
vals['name'] = '/'.join([vals['name'], line.warehouse_id.name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failing when no warehouse assigned to the line. Ok when adding a source warehouse to the SO line.
@aheficent I did improve code, Could you please review. |
if line._get_procurement_group_key()[0] == 12: | ||
if line.requested_date and line.warehouse_id: | ||
vals['name'] = '/'.join([vals['name'], line.warehouse_id.name, | ||
req_date]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd also put the following:
elif line.requested_date and not line.warehouse_id:
vals['name'] = '/'.join([vals['name'], req_date])
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not working. Created one sale order with two line with different requested date. Only one delivery created.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If sale_sourced_by_line may be discontinued #529 then this module should not depend on that. Don't you agree @jbeficent ?
@aheficent I did improve code, Could you please review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 It works now 🎉
36a0500
to
80fa1a0
Compare
Travis was failing because of other module. That was fixed so rebasing this PR should be enough to greenify it @nikul-serpentcs |
Hi @nikul-serpentcs can you rebase this PR? I am getting conflicts when merging this branch |
0a4784d
to
c1ad3b3
Compare
Hi, @aheficent I did rebase PR, could you please take a look? |
thanks @nikul-serpentcs |
IMHO this should not depend on |
Hi @nikul-serpentcs I'll attend this PR here: #668 Can you close this one? Thanks |
Sale Procurement Group by Requested date
This module creates different procurements groups for different requested dates in a sale order line when the sale order is confirmed. It depends on sale_sourced_by_line so this module will group procurements
also by the warehouse in the sale order line.