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:48 +02:00
1 parent dceb9b14d3
commit 647d3beacb
1 file changed
+4 -5
+4 -5
View File
@@ -94,20 +94,19 @@ 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
>>> template.type = 'goods'
>>> template.list_price = Decimal('20')
>>> template.cost_price = Decimal('8')
>>> template.purchasable = True
>>> template.account_expense = expense
>>> product, = template.products
>>> product.cost_price = Decimal('8')
>>> template.save()
>>> product.template = template
>>> product.save()
>>> product, = template.products
Create purchase requisition without product and description::