Skip to content

Commit

Permalink
[MIG] sale_order_whole_delivered_invoiceability: Migration to version…
Browse files Browse the repository at this point in the history
… 17.0

TT52356
  • Loading branch information
pilarvargas-tecnativa committed Jan 10, 2025
1 parent 2195c5e commit ead1f02
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sale_order_whole_delivered_invoiceability/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{
"name": "Sale Order Whole Delivered Invoiceability",
"version": "15.0.1.0.0",
"version": "17.0.1.0.0",
"category": "Sales Management",
"license": "AGPL-3",
"author": "Tecnativa, Odoo Community Association (OCA)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ def _compute_whole_delivered_invoiceability(self):
record.whole_delivered_invoiceability = True

@api.depends("whole_delivered_invoiceability")
def _get_invoice_status(self):
def _compute_invoice_status(self):
# Intercept the invoice_status computed method to
# set it as not invoiceable if the delivered quantity
# is less than the ordered quantity.
res = super()._get_invoice_status()
res = super()._compute_invoice_status()
for order in self.filtered("whole_delivered_invoiceability"):
uncomplete_lines = order.order_line.filtered(
lambda line: line.product_id.invoice_policy == "delivery"
Expand Down

0 comments on commit ead1f02

Please sign in to comment.