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

[10.0] [ADD] sale_procurement_group_by_requested_date #541

Conversation

nikul-serpentcs
Copy link
Member

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.

@nikul-serpentcs
Copy link
Member Author

@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,
Copy link
Contributor

@AaronHForgeFlow AaronHForgeFlow Oct 10, 2017

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.

@nikul-serpentcs
Copy link
Member Author

@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])
Copy link
Contributor

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])

Copy link
Contributor

@AaronHForgeFlow AaronHForgeFlow left a 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.

Copy link
Contributor

@AaronHForgeFlow AaronHForgeFlow left a 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 ?

@nikul-serpentcs
Copy link
Member Author

@aheficent I did improve code, Could you please review.

Copy link
Contributor

@AaronHForgeFlow AaronHForgeFlow left a comment

Choose a reason for hiding this comment

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

👍 It works now 🎉

@nikul-serpentcs nikul-serpentcs force-pushed the 10.0-sale_procurement_group_by_requested_date branch from 36a0500 to 80fa1a0 Compare January 24, 2018 08:48
@AaronHForgeFlow
Copy link
Contributor

Travis was failing because of other module. That was fixed so rebasing this PR should be enough to greenify it @nikul-serpentcs

@AaronHForgeFlow
Copy link
Contributor

Hi @nikul-serpentcs can you rebase this PR? I am getting conflicts when merging this branch

@nikul-serpentcs nikul-serpentcs force-pushed the 10.0-sale_procurement_group_by_requested_date branch from 0a4784d to c1ad3b3 Compare April 5, 2018 11:16
@nikul-serpentcs
Copy link
Member Author

Hi @nikul-serpentcs can you rebase this PR? I am getting conflicts when merging this branch

Hi, @aheficent I did rebase PR, could you please take a look?

@AaronHForgeFlow
Copy link
Contributor

thanks @nikul-serpentcs

@AaronHForgeFlow
Copy link
Contributor

IMHO this should not depend on sale_sourced_by_line What if I just one to split procurement groups by requested date but not to select warehouses on sale_order_lines? I think it is just fine to remove the dependency, because the group key works independently.

@AaronHForgeFlow
Copy link
Contributor

Hi @nikul-serpentcs I'll attend this PR here: #668 Can you close this one? Thanks

@nikul-serpentcs nikul-serpentcs deleted the 10.0-sale_procurement_group_by_requested_date branch March 20, 2019 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants