[18.0] [MIG] sale_invoice_policy#3346
Conversation
5abf01d to
bcdb778
Compare
bcdb778 to
6ac4533
Compare
|
/ocabot migration sale_invoice_policy |
1a71668 to
942d999
Compare
942d999 to
91bd254
Compare
BT-dmoreno
left a comment
There was a problem hiding this comment.
Changes across versions were minimal, and they looks all good to me.
|
@marielejeune could you please re-run the two failed tests? The logs have expired and I have no idea what the complain was about. |
91bd254 to
288624c
Compare
|
Hi @BT-dmoreno here there are. I'm going to have a look to fix them asap, but I'm just coming back from holidays, so let me a few days :-) |
|
Hi @marielejeune, hope everything is going fine after your holidays. Please let me know if there is some way I can help you to finish with is missing here? Looks like there's just a little bit missing. |
…status computation
…y is required on Sale Orders
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-16.0/sale-workflow-16.0-sale_invoice_policy Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_invoice_policy/
Don't use the 'required' parameter to compute the quantities to invoice or not. In fact, this should only depends on the invoice policy itself.
As ORM appends new depends() parameters to existing ones, simplify the writing
…he amount As for the 'qty_to_invoice' field, the 'untaxed_amount_to_invoice' field should not depends on the required option to compute its value
As we don't want to rewrite Odoo core method inside this module, we should not rewrite the method to compute the untaxed amount to invoice. Instead, save the product invoice policy, change it to sale order one without recomputing context, call the super() method and then, restore its former value.
…olicy With default behavior in Odoo, the invoicing policy depends on products configuration. So, include this as possible value for sale order invoicing policy. Possible values are so: - Products Invoice Policy: each product applies its invoicing policy (by sale line) - Ordered quantities: the whole sale order will apply the invoicing policy on ordered quantities - Delivered Quantities: the whole sale order will apply the invoicing policy on delivered quantities That said, the 'required' configuration is no more useful as the invoicing policy is now required on sale order level.
…ecompute() To avoid marking 'invoice_policy' product field as dirty for products temporary value, use the working context manager 'protecting()' instead of deprecated 'norecompute() one. Put the whole process in its own contextmanager.
288624c to
b0741bb
Compare
|
Hi @BT-dmoreno tests are fixed, sorry for the delay! |
|
Really thanks a lot @marielejeune 🥇. @OCA/crm-sales-marketing-maintainers looks like everything is ready here, could you please check and merge this PR? |
|
This PR has the |
|
@OCA/crm-sales-marketing-maintainers do you think everything is fine now? In case it's all good, could you please merge this PR? |
|
/ocabot merge nobump |
|
Hey, thanks for contributing! Proceeding to merge this for you. |
|
It looks like something changed on |
|
It looks like something changed on |
|
Congratulations, your PR was merged at 68cae11. Thanks a lot for contributing to OCA. ❤️ |
Migration of
sale_invoice_policy. I based this PR on #3376 to include the needed fixes/improvements. I've checked nothing was changed in this addon in v17.