mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
Merge branch 'fix/14.0/H4936_account_invoice_margin__refactored_to_safely_index_list' into '14.0-test'
fix/14.0/H4936_account_invoice_margin__refactored_to_safely_index_list into 14.0-test See merge request hibou-io/hibou-odoo/suite!719
This commit is contained in:
@@ -31,10 +31,10 @@ class AccountMoveLine(models.Model):
|
||||
|
||||
@api.model_create_multi
|
||||
def create(self, vals):
|
||||
line = super(AccountMoveLine, self).create(vals)
|
||||
if 'purchase_price' not in vals[0]:
|
||||
line.product_id_change_margin()
|
||||
return line
|
||||
lines = super(AccountMoveLine, self).create(vals)
|
||||
if vals and 'purchase_price' not in vals[0]:
|
||||
lines.product_id_change_margin()
|
||||
return lines
|
||||
|
||||
@api.depends('product_id', 'purchase_price', 'quantity', 'price_unit', 'price_subtotal')
|
||||
def _product_margin(self):
|
||||
|
||||
Reference in New Issue
Block a user