Remove accounts from products
issue3805 review45111002
This commit is contained in:
1 parent
c3815d0477
commit
9c670aa81b
1 file changed
+10
-2
@@ -61,6 +61,15 @@ Create complaint type::
|
||||
... [('model', '=', 'account.invoice.line')])
|
||||
>>> invoice_line_type.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')
|
||||
@@ -73,8 +82,7 @@ Create product::
|
||||
>>> template.type = 'goods'
|
||||
>>> template.salable = True
|
||||
>>> template.list_price = Decimal('10')
|
||||
>>> template.account_expense = expense
|
||||
>>> template.account_revenue = revenue
|
||||
>>> template.account_category = account_category
|
||||
>>> template.save()
|
||||
>>> product, = template.products
|
||||
|
||||
|
||||
Reference in new issue
Block a user