New product types: Goods, Assets and Service
review260001
This commit is contained in:
@@ -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')
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user