Minor update

This commit is contained in:
Alexis de Lattre
2016-10-13 17:06:48 +02:00
parent 64e08b93de
commit c492904e2b
3 changed files with 5 additions and 26 deletions

View File

@@ -174,7 +174,9 @@ class AccountInvoiceLine(orm.Model):
# We write standard_price_company_currency even on supplier invoice/refunds
# because we don't have access to the 'type' of the invoice
def create(self, cr, uid, vals, context=None):
if vals.get('product_id'):
if (
vals.get('product_id') and
'standard_price_company_currency' not in vals):
pp = self.pool['product.product'].browse(
cr, uid, vals['product_id'], context=context)
std_price = pp.standard_price