Move cost price to product level instead of template

issue6515
review41321002
This commit is contained in:
Cédric Krier
2017-07-05 14:51:43 +02:00
parent a417435fbc
commit 0ebc542e4a
+1 -6
View File
@@ -78,21 +78,16 @@ Create product::
>>> ProductUom = Model.get('product.uom')
>>> unit, = ProductUom.find([('name', '=', 'Unit')])
>>> ProductTemplate = Model.get('product.template')
>>> Product = Model.get('product.product')
>>> product = Product()
>>> template = ProductTemplate()
>>> template.name = 'product'
>>> template.default_uom = unit
>>> template.type = 'goods'
>>> template.purchasable = True
>>> template.list_price = Decimal('10')
>>> template.cost_price = Decimal('5')
>>> template.cost_price_method = 'fixed'
>>> template.account_expense = expense
>>> template.account_revenue = revenue
>>> template.save()
>>> product.template = template
>>> product.save()
>>> product, = template.products
Create payment term::