Move cost price to product level instead of template

issue6515
review41321002
This commit is contained in:
Cédric Krier
2017-07-05 14:51:41 +02:00
parent 5bfb27a039
commit 8cda3affd7
3 changed files with 3 additions and 15 deletions
+1 -5
View File
@@ -84,20 +84,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 = 'service'
>>> template.list_price = Decimal('40')
>>> template.cost_price = Decimal('25')
>>> template.account_expense = expense
>>> template.account_revenue = revenue
>>> template.customer_taxes.append(tax)
>>> template.save()
>>> product.template = template
>>> product.save()
>>> product, = template.products
Create payment term::
@@ -93,20 +93,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 = 'service'
>>> template.list_price = Decimal('40')
>>> template.cost_price = Decimal('25')
>>> template.account_expense = expense
>>> template.account_revenue = revenue
>>> template.customer_taxes.append(tax)
>>> template.save()
>>> product.template = template
>>> product.save()
>>> product, = template.products
Create invoice with alternate currency::
+1 -5
View File
@@ -61,20 +61,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 = 'service'
>>> template.list_price = Decimal('40')
>>> template.cost_price = Decimal('20')
>>> template.account_expense = expense
>>> template.account_revenue = revenue
>>> template.supplier_taxes.append(tax)
>>> template.save()
>>> product.template = template
>>> product.save()
>>> product, = template.products
Create payment term::