Remove accounts from products

issue3805
review45111002
This commit is contained in:
Cédric Krier
2018-06-20 12:09:41 +02:00
parent 2decfd0898
commit 3f1ea14e95
3 changed files with 33 additions and 9 deletions
+11 -3
View File
@@ -85,6 +85,16 @@ Create party::
>>> party = Party(name='Party')
>>> party.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.customer_taxes.append(tax)
>>> account_category.save()
Create product::
>>> ProductUom = Model.get('product.uom')
@@ -95,9 +105,7 @@ Create product::
>>> template.default_uom = unit
>>> template.type = 'service'
>>> template.list_price = Decimal('40')
>>> template.account_expense = expense
>>> template.account_revenue = revenue
>>> template.customer_taxes.append(tax)
>>> template.account_category = account_category
>>> template.save()
>>> product, = template.products
+11 -3
View File
@@ -84,6 +84,16 @@ Create party::
>>> party = Party(name='Party')
>>> party.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.customer_taxes.append(tax)
>>> account_category.save()
Create product::
>>> ProductUom = Model.get('product.uom')
@@ -94,9 +104,7 @@ Create product::
>>> template.default_uom = unit
>>> template.type = 'service'
>>> template.list_price = Decimal('40')
>>> template.account_expense = expense
>>> template.account_revenue = revenue
>>> template.customer_taxes.append(tax)
>>> template.account_category = account_category
>>> template.save()
>>> product, = template.products
+11 -3
View File
@@ -62,6 +62,16 @@ Create party::
>>> party = Party(name='Party')
>>> party.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.supplier_taxes.append(tax)
>>> account_category.save()
Create product::
>>> ProductUom = Model.get('product.uom')
@@ -72,9 +82,7 @@ Create product::
>>> template.default_uom = unit
>>> template.type = 'service'
>>> template.list_price = Decimal('40')
>>> template.account_expense = expense
>>> template.account_revenue = revenue
>>> template.supplier_taxes.append(tax)
>>> template.account_category = account_category
>>> template.save()
>>> product, = template.products