Tower: upload laundry_management 19.0.19.0.4 (via marketplace)
This commit is contained in:
22
addons/laundry_management/models/pos_session_ext.py
Normal file
22
addons/laundry_management/models/pos_session_ext.py
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
"""POS session extension for laundry.
|
||||||
|
|
||||||
|
Cash settlements use account.bank.statement.line tagged with
|
||||||
|
pos_session_id, so POS's native _compute_cash_balance picks them up
|
||||||
|
automatically — no display/math override is required.
|
||||||
|
|
||||||
|
We only override _load_pos_data_models to ship our two new configuration
|
||||||
|
models (laundry.order.type, laundry.order.attribute) to the POS client.
|
||||||
|
"""
|
||||||
|
import logging
|
||||||
|
from odoo import models
|
||||||
|
|
||||||
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
class PosSessionLaundryExt(models.Model):
|
||||||
|
_inherit = 'pos.session'
|
||||||
|
|
||||||
|
def _load_pos_data_models(self, config):
|
||||||
|
models_to_load = super()._load_pos_data_models(config)
|
||||||
|
models_to_load += ['laundry.order.type', 'laundry.order.attribute']
|
||||||
|
return models_to_load
|
||||||
Reference in New Issue
Block a user