[IMP] pos_restaurant: table_id, customer_count fields readonly

currently the table_id, customer_count fields are editable from the pos order form in the backend and all the other fields are readonly

closes odoo/odoo#107135

Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
This commit is contained in:
niyasraphy
2022-12-05 17:06:56 +01:00
parent 05a3ad3159
commit 3bb81be583
+2 -2
View File
@@ -20,8 +20,8 @@ class PosOrderLine(models.Model):
class PosOrder(models.Model):
_inherit = 'pos.order'
table_id = fields.Many2one('restaurant.table', string='Table', help='The table where this order was served', index='btree_not_null')
customer_count = fields.Integer(string='Guests', help='The amount of customers that have been served by this order.')
table_id = fields.Many2one('restaurant.table', string='Table', help='The table where this order was served', index='btree_not_null', readonly=True)
customer_count = fields.Integer(string='Guests', help='The amount of customers that have been served by this order.', readonly=True)
multiprint_resume = fields.Char(string='Multiprint Resume', help="Last printed state of the order")
def _get_pack_lot_lines(self, order_lines):