Remove accounts from products
issue3805 review45111002
This commit is contained in:
1 parent
e031737a9b
commit
1c9864f05e
1 file changed
+12
-4
@@ -71,6 +71,17 @@ Create customer consignment location::
|
||||
>>> customer_consignment_loc.consignment_party = customer
|
||||
>>> customer_consignment_loc.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(supplier_tax)
|
||||
>>> account_category.customer_taxes.append(customer_tax)
|
||||
>>> account_category.save()
|
||||
|
||||
Create product::
|
||||
|
||||
>>> ProductUom = Model.get('product.uom')
|
||||
@@ -85,10 +96,7 @@ Create product::
|
||||
>>> template.purchasable = True
|
||||
>>> template.salable = True
|
||||
>>> template.list_price = Decimal('10')
|
||||
>>> template.account_expense = expense
|
||||
>>> template.account_revenue = revenue
|
||||
>>> template.supplier_taxes.append(supplier_tax)
|
||||
>>> template.customer_taxes.append(customer_tax)
|
||||
>>> template.account_category = account_category
|
||||
>>> product_supplier = template.product_suppliers.new()
|
||||
>>> product_supplier.party = supplier
|
||||
>>> price = product_supplier.prices.new()
|
||||
|
||||
Reference in new issue
Block a user