Remove accounts from products.

This commit is contained in:
Albert Cervera i Areny 2018-08-18 23:34:08 +02:00
parent 116cca1c29
commit 0947a2f905
1 changed files with 7 additions and 6 deletions

View File

@ -85,11 +85,14 @@ Create parties::
>>> customer = Party(name='Customer')
>>> customer.save()
Create category::
Create account category::
>>> ProductCategory = Model.get('product.category')
>>> category = ProductCategory(name='Category')
>>> category.save()
>>> 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::
@ -100,15 +103,13 @@ Create product::
>>> product = Product()
>>> template = ProductTemplate()
>>> template.name = 'product'
>>> template.category = category
>>> template.default_uom = unit
>>> template.type = 'goods'
>>> template.purchasable = True
>>> template.salable = True
>>> template.list_price = Decimal('10')
>>> template.cost_price_method = 'fixed'
>>> template.account_expense = expense
>>> template.account_revenue = revenue
>>> template.account_category = account_category
>>> product, = template.products
>>> product.cost_price = Decimal('5')
>>> template.save()