Remove accounts from products

issue3805
review45111002
This commit is contained in:
Cédric Krier
2018-06-20 12:09:53 +02:00
parent d2e35e532f
commit 6d4e8de959
2 changed files with 21 additions and 6 deletions
+11 -4
View File
@@ -83,6 +83,15 @@ Create parties::
>>> customer = Party(name='Customer')
>>> 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::
>>> ProductUom = Model.get('product.uom')
@@ -96,9 +105,8 @@ Create product::
>>> template.purchasable = True
>>> template.salable = True
>>> template.list_price = Decimal('10')
>>> template.account_expense = expense
>>> template.account_revenue = revenue
>>> template.supply_on_sale = True
>>> template.account_category = account_category
>>> template.save()
>>> product, = template.products
@@ -207,8 +215,7 @@ not create a new purchase request::
>>> changing_template.purchasable = True
>>> changing_template.salable = True
>>> changing_template.list_price = Decimal('10')
>>> changing_template.account_expense = expense
>>> changing_template.account_revenue = revenue
>>> changing_template.account_category = account_category
>>> changing_template.supply_on_sale = False
>>> changing_template.save()
>>> changing_product, = changing_template.products
@@ -46,6 +46,15 @@ Create parties::
>>> customer = Party(name='Customer')
>>> customer.save()
Create account category::
>>> ProductCategory = Model.get('product.category')
>>> account_category = ProductCategory(name="Account Category")
>>> account_category.accounting = True
>>> account_category.account_expense = accounts['expense']
>>> account_category.account_revenue = accounts['revenue']
>>> account_category.save()
Create product::
>>> ProductUom = Model.get('product.uom')
@@ -59,9 +68,8 @@ Create product::
>>> template.salable = True
>>> template.purchasable = True
>>> template.list_price = Decimal('10')
>>> template.account_revenue = accounts['revenue']
>>> template.account_expense = accounts['expense']
>>> template.supply_on_sale = True
>>> template.account_category = account_category
>>> template.save()
>>> product, = template.products