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

[11.0] merge "purchase_fop_shipping" and "purchase_minimum_amount" #464

Closed
JordiBForgeFlow opened this issue Oct 9, 2017 · 9 comments
Closed
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.

Comments

@JordiBForgeFlow
Copy link
Member

We have identified that in v10 the following modules provide very similar features:
purchase_fop_shipping: https://github.com/OCA/purchase-workflow/tree/10.0/purchase_fop_shipping
purchase_minimum_amount: https://github.com/OCA/purchase-workflow/tree/10.0/purchase_minimum_amount

As we are now planning to migrate purchase_minimum_amount to v11, we propose to merge them together. We can prepare a migration script for those using purchase_fop_shipping.

@JordiBForgeFlow
Copy link
Member Author

cc @mourad-ehm @bealdav what do you think?

@mourad-ehm
Copy link
Contributor

I think is a good idea to merge them.
What to you think if the new module will be based on base_exception (like sale_exception) ?
I can study to possibility to migrate base_exception to v 11 if you use it.

@bealdav
Copy link
Member

bealdav commented Oct 9, 2017

@jbeficent do you consider to develop purchase_exception (sale_exception like)) ? Then purchase_fop_shipping and purchase_minimum_amount could be merged in a very small module just two use cases of exceptions ?
If yes, I'm OK with mourad proposal to migrate base_exception in v11 even if we have no project in v11 for now.

@JordiBForgeFlow
Copy link
Member Author

@bealdav purchase_fop_shipping does what purchase_minimum_amount does, but slightly differently in the way to approach.

Also fyi, 'purchase_order_approval_block' has also been merged recently. https://github.com/OCA/purchase-workflow/tree/10.0/purchase_order_approval_block and purchase_minimum_amount depends on it.

We could keep the approval block field proposed in purchase_minimum_amount, if the amount is below the minimum, and then raise an exception when a user attempts to confirm an order, not because the amount is lower, but because the order has an approval block set.

Another interesting thing is that in purchase_minimum_amount we rely on the existing PO status 'To Approve'. The standard validation of amount > whatever defined in company, relies on this status.

To me, you should define in the exception rules if you want the PO to change to 'To Approve' when this exception occurs. This would be a useful mechanism of the PO approvers to review certain exception rules.

For example

  • Rule A says when the amount is less than minimum set by the vendor, it requires the approval by a purchase manager.
  • Rule B says that if the partner does not have a zip code, it requires inmediate correction (the PO stays in draft).

@bealdav
Copy link
Member

bealdav commented Oct 9, 2017

OK, I'll let @mourad-ehm talk with you here, but on our side as indicated, we can port base_exception in v11 and bring some modifications related triggering exceptions : as far as I remember in sale_exception it's when the sale is confirmed. But it could be to any specified step of the status.
Thanks.

@mourad-ehm
Copy link
Contributor

Ok, I will add a field next_state to the rule. Thus if the state is set, we change the object value to this state if the rule is detected. If no state is set on rule, we only block until the correction is set or the action is forced by a user which belong to the group "group_exception_rule_manager".

@mourad-ehm
Copy link
Contributor

mourad-ehm commented Oct 13, 2017

I migrate base_exception OCA/server-tools#1025. I will create purchase exception module.

@mourad-ehm
Copy link
Contributor

I added a new module purchase_exception: #467

@github-actions
Copy link

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Mar 27, 2022
@github-actions github-actions bot closed this as completed May 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

No branches or pull requests

3 participants