diff options
| author | Martin Trigaux <mat@odoo.com> | 2017-05-02 14:21:34 +0200 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2017-05-02 14:25:29 +0200 |
| commit | ceeee8e6e2f680c4bcc60e3b925d6f5eaea5730b (patch) | |
| tree | 43b8b90bc2ba2b7afcd578ed8629b0bfe9b87dd3 /addons | |
| parent | 89c2e50933bbcc64219448e1465bb8c79e2c868b (diff) | |
[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
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/sale/sale.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/sale/sale.py b/addons/sale/sale.py index d7e3380b595..d625f41fe8c 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -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): |
