Tower: upload laundry_management 19.0.19.0.4 (was 19.0.19.0.4, via marketplace)

This commit is contained in:
2026-05-02 11:57:30 +00:00
parent ee9b1958f1
commit d7bc4a4b88
230 changed files with 17001 additions and 0 deletions

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
)