[FIX] base,sale_margin: correct error introduced during previous forward-port

This commit is contained in:
Christophe Simonis
2016-02-29 13:09:06 +01:00
parent 1c7f5a45e5
commit a3bc09ce94
2 changed files with 1 additions and 4 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ class SaleOrderLine(models.Model):
vals['purchase_price'] = self._compute_margin(order_id, product_id, product_uom_id)
return super(sale_order_line, self).create(vals)
return super(SaleOrderLine, self).create(vals)
@api.depends('product_id', 'purchase_price', 'product_uom_qty', 'price_unit')
def _product_margin(self):
-3
View File
@@ -562,9 +562,6 @@ class res_partner(osv.Model, format_address):
@api.model
def create(self, vals):
if vals.get('type') in ['delivery', 'invoice'] and not vals.get('image'):
# force no colorize for images with no transparency
vals['image'] = self.with_context(partner_type=vals['type'])._get_default_image(False, False)
if vals.get('website'):
vals['website'] = self._clean_website(vals['website'])
# function field not correctly triggered at create -> remove me when