Browse Source

Fix S0023 : do not change the cost

pull/14/head
EliseDup 8 years ago
parent
commit
21fe389f00
  1. 4
      beesdoo_product/models/beesdoo_product.py

4
beesdoo_product/models/beesdoo_product.py

@ -28,9 +28,6 @@ class BeesdooProduct(models.Model):
# S0023 : List_price = Price HTVA, so add a suggested price # S0023 : List_price = Price HTVA, so add a suggested price
list_price = fields.Float(string='exVAT Price') list_price = fields.Float(string='exVAT Price')
suggested_price = fields.Float(string='Suggested exVAT Price', compute='_compute_cost', readOnly=True) suggested_price = fields.Float(string='Suggested exVAT Price', compute='_compute_cost', readOnly=True)
standard_price = fields.Float(compute='_compute_cost')
standard_price = fields.Float(string='exVAT Cost')
def _get_main_supplier_info(self): def _get_main_supplier_info(self):
return self.seller_ids.sorted(key=lambda seller: seller.date_start, reverse=True) return self.seller_ids.sorted(key=lambda seller: seller.date_start, reverse=True)
@ -69,7 +66,6 @@ class BeesdooProduct(models.Model):
def _compute_cost(self): def _compute_cost(self):
suppliers = self._get_main_supplier_info() suppliers = self._get_main_supplier_info()
if(len(suppliers) > 0): if(len(suppliers) > 0):
self.standard_price = suppliers[0].price * self.uom_po_id.factor
self.suggested_price = (suppliers[0].price * self.uom_po_id.factor)* (1 + suppliers[0].product_tmpl_id.categ_id.profit_margin / 100) self.suggested_price = (suppliers[0].price * self.uom_po_id.factor)* (1 + suppliers[0].product_tmpl_id.categ_id.profit_margin / 100)
class BeesdooProductLabel(models.Model): class BeesdooProductLabel(models.Model):

Loading…
Cancel
Save