[FIX] sale: avoid updating layout sequence at creation
When a invoice line is create a default layout_category_sequence was created with a value of 0, updating the value of layout_category_id.sequence instead of fetching it. This operation was very slow on the invoice creation wizard opw-741517
This commit is contained in:
+1
-1
@@ -964,7 +964,7 @@ class AccountInvoiceLine(models.Model):
|
||||
|
||||
sale_line_ids = fields.Many2many('sale.order.line', 'sale_order_line_invoice_rel', 'invoice_line_id', 'order_line_id', string='Sale Order Lines', readonly=True, copy=False)
|
||||
layout_category_id = fields.Many2one('sale.layout_category', string='Section')
|
||||
layout_category_sequence = fields.Integer(related='layout_category_id.sequence', string='Layout Sequence', store=True, default=0)
|
||||
layout_category_sequence = fields.Integer(related='layout_category_id.sequence', string='Layout Sequence', store=True)
|
||||
|
||||
|
||||
class ProcurementOrder(models.Model):
|
||||
|
||||
Reference in New Issue
Block a user