Tower: upload laundry_management 19.0.19.0.4 (via marketplace)

This commit is contained in:
2026-05-01 15:01:21 +00:00
parent eb27193b6e
commit 44ec4115ea

View File

@@ -0,0 +1,33 @@
from odoo import models, fields, api
class ProductTemplateExt(models.Model):
"""Extend product.template with the two flags the laundry workflow needs.
is_laundry_service: marks products as laundry services. POS sales of
these products auto-create / link a laundry.order.
is_laundry_settlement: internal flag for the dedicated settlement
product used to collect outstanding laundry dues without
generating revenue lines.
"""
_inherit = 'product.template'
is_laundry_service = fields.Boolean(
string='Laundry Service',
default=False,
help='Tick to include this product in the Laundry Service Catalog '
'and allow selection on laundry order lines.',
)
is_laundry_settlement = fields.Boolean(
string='Laundry Settlement',
default=False,
help='Internal flag for the settlement product. '
'Do not enable on regular products.',
)
@api.model
def _load_pos_data_fields(self, config_id):
fields = super()._load_pos_data_fields(config_id)
fields.append('is_laundry_service')
fields.append('is_laundry_settlement')
return fields