-
-
Notifications
You must be signed in to change notification settings - Fork 982
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
[17.0] [MIG] sale_force_invoiced: migration to 17.0 #2961
Conversation
* [ADD] module 'sale_force_invoiced' for 9.0 * [FIX] Travis
Updated by Update PO files to match POT (msgmerge) hook in Weblate.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-12.0/sale-workflow-12.0-sale_force_invoiced Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_force_invoiced/
Currently translated at 100.0% (3 of 3 strings) Translation: sale-workflow-12.0/sale-workflow-12.0-sale_force_invoiced Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_force_invoiced/de/
Currently translated at 100.0% (3 of 3 strings) Translation: sale-workflow-12.0/sale-workflow-12.0-sale_force_invoiced Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_force_invoiced/zh_CN/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-13.0/sale-workflow-13.0-sale_force_invoiced Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-13-0/sale-workflow-13-0-sale_force_invoiced/
Currently translated at 100.0% (3 of 3 strings) Translation: sale-workflow-13.0/sale-workflow-13.0-sale_force_invoiced Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-13-0/sale-workflow-13-0-sale_force_invoiced/es/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-13.0/sale-workflow-13.0-sale_force_invoiced Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-13-0/sale-workflow-13-0-sale_force_invoiced/
Currently translated at 100.0% (3 of 3 strings) Translation: sale-workflow-13.0/sale-workflow-13.0-sale_force_invoiced Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-13-0/sale-workflow-13-0-sale_force_invoiced/ca/
Sometimes you have a SO that Odoo computes as "Nothing to invoice" but you want to force it to "Fully invoiced" anyway. Example: SO with 2 lines, line one is delivered and invoiced, second line is never going to be delivered nor invoiced ( because of different bussiness reasons). In this situation you still want to mark the SO as fully invoiced.
Currently translated at 100.0% (3 of 3 strings) Translation: sale-workflow-14.0/sale-workflow-14.0-sale_force_invoiced Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_force_invoiced/fr/
Currently translated at 100.0% (3 of 3 strings) Translation: sale-workflow-16.0/sale-workflow-16.0-sale_force_invoiced Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_force_invoiced/pt_BR/
Currently translated at 100.0% (3 of 3 strings) Translation: sale-workflow-16.0/sale-workflow-16.0-sale_force_invoiced Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_force_invoiced/pt/
Currently translated at 100.0% (3 of 3 strings) Translation: sale-workflow-16.0/sale-workflow-16.0-sale_force_invoiced Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_force_invoiced/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-16.0/sale-workflow-16.0-sale_force_invoiced Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_force_invoiced/
Currently translated at 100.0% (3 of 3 strings) Translation: sale-workflow-16.0/sale-workflow-16.0-sale_force_invoiced Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_force_invoiced/fr/
Currently translated at 100.0% (3 of 3 strings) Translation: sale-workflow-16.0/sale-workflow-16.0-sale_force_invoiced Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_force_invoiced/it/
Currently translated at 100.0% (3 of 3 strings) Translation: sale-workflow-16.0/sale-workflow-16.0-sale_force_invoiced Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_force_invoiced/de/
@@ -21,6 +20,6 @@ class SaleOrder(models.Model): | |||
def _compute_invoice_status(self): | |||
res = super()._compute_invoice_status() | |||
self.filtered( | |||
lambda so: so.force_invoiced and so.state in ("sale", "done") | |||
lambda so: so.force_invoiced and (so.state == "sale" or so.locked) |
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.
In principle, only orders in sale
status can be locked. I think you can simplify the module by ignoring the locked
field everywhere and just go by state sale
. Note that orders in any other state will not be marked as invoiceable by Odoo: https://github.com/odoo/odoo/blob/3f6deca/addons/sale/models/sale_order.py#L530-L531 so even if orders were to be locked in any other status, this override might be considered meaningless for such orders. Or am i missing anything?
/ocabot migration sale_force_invoiced |
5e3072c
to
c6e01d0
Compare
@JordiBForgeFlow @MiquelRForgeFlow @StefanRijnhart @siemenv I would say this module is quite dangerous and something has to be put in README. If a sale order is put as force invoiced and a line is added that generates a delivery order, the sale order won't never been invoiced for that outgoing product. |
Maybe a roadmap item can be added for a feature to ensure that only locked orders can be forced invoiced? @siemenv thanks for the update. Due to squashing, your commit message now has two lines:
Only the first line is visible in the commit history here on Github. It must say Can you fix the commit message? |
c6e01d0
to
705d0e6
Compare
/ocabot migration sale_force_invoiced |
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.
/ocabot merge nobump
Hey, thanks for contributing! Proceeding to merge this for you. |
Congratulations, your PR was merged at 8c82f24. Thanks a lot for contributing to OCA. ❤️ |
No description provided.