Tower: upload laundry_management 19.0.19.0.4 (via marketplace)
This commit is contained in:
33
addons/laundry_management/models/product_template_ext.py
Normal file
33
addons/laundry_management/models/product_template_ext.py
Normal 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
|
||||
Reference in New Issue
Block a user