New product types: Goods, Assets and Service

review260001
This commit is contained in:
Cédric Krier
2012-03-16 12:41:59 +01:00
parent 5023e53e11
commit 4135643a89
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -107,7 +107,7 @@ class Sale(Model):
cost_line = {}
product_ids = [line['product'] for line in values.get('lines') or []
if line.get('product')]
stockable = any(product.type in ('stockable', 'consumable')
stockable = any(product.type in ('goods', 'assets')
for product in product_obj.browse(product_ids))
if cost and currency_id and stockable:
if (values.get('currency')
+1 -1
View File
@@ -135,7 +135,7 @@ Create product::
>>> product.name = 'Product'
>>> product.category = category
>>> product.default_uom = unit
>>> product.type = 'stockable'
>>> product.type = 'goods'
>>> product.salable = True
>>> product.list_price = Decimal('20')
>>> product.cost_price = Decimal('8')