[IMP] purchase: some l10n taxes could break test

For example l10n_ch has default included purchase tax on products. This
would impact the valuation of the product and fail the tests.

This commit removes these taxes in the purchase test (they are tested
elsewhere anyway) and also use python to change the company currency
(since the current way didn't seem to work).

opw-691996
This commit is contained in:
Nicolas Lempereur
2016-12-19 08:31:12 +01:00
parent 1246a470df
commit 13063dd177
3 changed files with 7 additions and 3 deletions
+1
View File
@@ -12,6 +12,7 @@
cost_method: average
property_stock_account_input: o_expense
property_stock_account_output: o_income
supplier_taxes_id: []
description: Average Ice Cream can be mass-produced and thus is widely available in developed parts of the world. Ice cream can be purchased in large cartons (vats and squrounds) from supermarkets and grocery stores, in smaller quantities from ice cream shops, convenience stores, and milk bars, and in individual servings from small carts or vans at public events.
-
I create a draft Purchase Order for first incoming shipment for 10 pieces at 60€
+5 -3
View File
@@ -1,8 +1,9 @@
-
Set the company currency as EURO for the sake of repeatibility
-
!record {model: res.company, id: base.main_company}:
currency_id: base.EUR
!python {model: res.company}: |
company = self.browse(cr, uid, ref('base.main_company'))
company.currency_id = company.env['res.currency'].browse(ref('base.EUR'))
-
Set a product as using fifo price
-
@@ -19,13 +20,13 @@
valuation: real_time
property_stock_account_input: o_expense
property_stock_account_output: o_income
supplier_taxes_id: []
description: FIFO Ice Cream can be mass-produced and thus is widely available in developed parts of the world. Ice cream can be purchased in large cartons (vats and squrounds) from supermarkets and grocery stores, in smaller quantities from ice cream shops, convenience stores, and milk bars, and in individual servings from small carts or vans at public events.
-
I create a draft Purchase Order for first in move for 10 kg at 50 euro
-
!record {model: purchase.order, id: purchase_order_fifo1}:
partner_id: base.res_partner_3
currency_id: base.EUR
order_line:
- product_id: product_fifo_icecream
product_qty: 10.0
@@ -268,6 +269,7 @@
valuation: real_time
property_stock_account_input: o_expense
property_stock_account_output: o_income
supplier_taxes_id: []
description:
-
Create outpicking. We create delivery order of 100 kg.
+1
View File
@@ -13,6 +13,7 @@
valuation: real_time
property_stock_account_input: o_expense
property_stock_account_output: o_income
supplier_taxes_id: []
description: FIFO Ice Cream can be mass-produced and thus is widely available in developed parts of the world. Ice cream can be purchased in large cartons (vats and squrounds) from supermarkets and grocery stores, in smaller quantities from ice cream shops, convenience stores, and milk bars, and in individual servings from small carts or vans at public events.
-
I create a draft Purchase Order for first in move for 10 kg at 50 euro