Remove accounts from products.
This commit is contained in:
parent
137daa339b
commit
0f5d59fe0b
|
@ -45,6 +45,15 @@ Create parties::
|
||||||
>>> customer = Party(name='Customer')
|
>>> customer = Party(name='Customer')
|
||||||
>>> customer.save()
|
>>> customer.save()
|
||||||
|
|
||||||
|
Create account category::
|
||||||
|
|
||||||
|
>>> ProductCategory = Model.get('product.category')
|
||||||
|
>>> account_category = ProductCategory(name="Account Category")
|
||||||
|
>>> account_category.accounting = True
|
||||||
|
>>> account_category.account_expense = expense
|
||||||
|
>>> account_category.account_revenue = revenue
|
||||||
|
>>> account_category.save()
|
||||||
|
|
||||||
Create product::
|
Create product::
|
||||||
|
|
||||||
>>> ProductUom = Model.get('product.uom')
|
>>> ProductUom = Model.get('product.uom')
|
||||||
|
@ -57,9 +66,8 @@ Create product::
|
||||||
>>> template.default_uom = unit
|
>>> template.default_uom = unit
|
||||||
>>> template.type = 'goods'
|
>>> template.type = 'goods'
|
||||||
>>> template.list_price = Decimal('20')
|
>>> template.list_price = Decimal('20')
|
||||||
>>> template.cost_price = Decimal('8')
|
|
||||||
>>> template.purchasable = True
|
>>> template.purchasable = True
|
||||||
>>> template.account_expense = expense
|
>>> template.account_category = account_category
|
||||||
>>> template.save()
|
>>> template.save()
|
||||||
>>> product.template = template
|
>>> product.template = template
|
||||||
>>> product.save()
|
>>> product.save()
|
||||||
|
|
Loading…
Reference in New Issue