Tower: upload laundry_management 19.0.19.0.4 (via marketplace)

This commit is contained in:
2026-05-01 15:01:10 +00:00
parent 051e01b1d5
commit d95c52e27a

View File

@@ -0,0 +1,21 @@
from odoo import models, fields, api
class AccountMoveLaundryExt(models.Model):
"""Flag invoices originating from laundry orders."""
_inherit = 'account.move'
is_laundry_invoice = fields.Boolean(
string='Laundry Invoice',
compute='_compute_is_laundry_invoice',
store=True,
)
@api.depends('invoice_line_ids.sale_line_ids.order_id.is_laundry_order')
def _compute_is_laundry_invoice(self):
for move in self:
move.is_laundry_invoice = any(
sol.order_id.is_laundry_order
for line in move.invoice_line_ids
for sol in line.sale_line_ids
)