Move cost price to product level instead of template

issue6515
review41321002
This commit is contained in:
Cédric Krier committed 2017-07-05 14:51:49 +02:00
1 parent 041fd59860
commit 9d0d78282c
1 file changed
+4 -9
+4 -9
View File
@@ -53,9 +53,8 @@ Create product::
>>> ProductUom = Model.get('product.uom')
>>> ProductTemplate = Model.get('product.template')
>>> Product = Model.get('product.product')
>>> unit, = ProductUom.find([('name', '=', 'Unit')])
>>> product = Product()
>>> template = ProductTemplate()
>>> template.name = 'Product'
>>> template.default_uom = unit
@@ -63,12 +62,10 @@ Create product::
>>> template.salable = True
>>> template.lead_time = datetime.timedelta(0)
>>> template.list_price = Decimal('20')
>>> template.cost_price = Decimal('8')
>>> template.account_revenue = revenue
>>> template.save()
>>> product.template = template
>>> product.save()
>>> carrier_product = Product()
>>> product, = template.products
>>> carrier_template = ProductTemplate()
>>> carrier_template.name = 'Carrier Product'
>>> carrier_template.default_uom = unit
@@ -76,11 +73,9 @@ Create product::
>>> carrier_template.salable = True
>>> carrier_template.lead_time = datetime.timedelta(0)
>>> carrier_template.list_price = Decimal('3')
>>> carrier_template.cost_price = Decimal(0)
>>> carrier_template.account_revenue = revenue
>>> carrier_template.save()
>>> carrier_product.template = carrier_template
>>> carrier_product.save()
>>> carrier_product, = carrier_template.products
Create carrier::