mirror of
https://gitlab.com/flectra-hq/flectra.git
synced 2026-08-17 16:54:42 -05:00
Merge branch 'master-upstream-patch-15012024' into 'master'
[PATCH] Upstream patch - 15012024 See merge request flectra-hq/flectra!1225
This commit is contained in:
@@ -18,7 +18,7 @@ class AccountTax(models.Model):
|
||||
('order_id.session_id.state', '!=', 'closed')
|
||||
])
|
||||
self_ids = set(self.ids)
|
||||
for lines_chunk in map(self.env['pos.order.line'].browse, split_every(100000, lines.ids)):
|
||||
for lines_chunk in map(self.env['pos.order.line'].sudo().browse, split_every(100000, lines.ids)):
|
||||
if any(tid in self_ids for ts in lines_chunk.read(['tax_ids']) for tid in ts['tax_ids']):
|
||||
raise UserError(_(
|
||||
'It is forbidden to modify a tax used in a POS order not posted. '
|
||||
|
||||
Reference in New Issue
Block a user