2
In order to test the product revaluation, we will create a new revaluation doc and confirm it
4
Creating a product.nomenclature record
6
!record {model: product.nomenclature, id: product_nomenclature_reval0}:
9
Creating a product.nomenclature record
11
!record {model: product.nomenclature, id: product_nomenclature_reval1}:
14
parent_id: product_nomenclature_reval0
16
Creating a product.nomenclature record
18
!record {model: product.nomenclature, id: product_nomenclature_reval2}:
21
parent_id: product_nomenclature_reval1
23
Creating a product.nomenclature record
25
!record {model: product.nomenclature, id: product_nomenclature_reval3}:
28
parent_id: product_nomenclature_reval2
30
Creating a product.category record
32
!record {model: product.category, id: product_category_reval0}:
34
family_id: product_nomenclature_reval2
36
Creating a product.product record
38
!record {model: product.product, id: product_product_reval0}:
40
categ_id: product.cat0
46
name_template: test product
47
nomen_manda_0: product_nomenclature_reval0
48
nomen_manda_1: product_nomenclature_reval1
49
nomen_manda_2: product_nomenclature_reval2
50
nomen_manda_3: product_nomenclature_reval3
51
procure_method: make_to_stock
59
uom_id: product.product_uom_unit
60
uom_po_id: product.product_uom_unit
62
valuation: manual_periodic
68
international_status: product_attributes.int_1
70
Creating a new revaluation doc
72
!record {model: stock.cost.reevaluation, id: reeval1}:
74
reevaluation_line_ids:
75
- product_id: product_product_reval0
78
Check the price is not reevaluate
80
!assert {model: product.product, id: product_product_reval0}:
81
- standard_price == 1.00, "The standard price is reevaluate"
83
Confirm the reevaluation doc
85
!python {model: stock.cost.reevaluation}: |
86
self.action_confirm(cr, uid, ref('reeval1'))
88
Check the price is not reevaluate
90
!assert {model: product.product, id: product_product_reval0}:
91
- standard_price == 1.00, "The standard price is reevaluate"
93
Validate the reevaluation doc
95
!python {model: stock.cost.reevaluation}: |
96
self.action_done(cr, uid, ref('reeval1'))
98
Check the price is not reevaluate
100
!assert {model: product.product, id: product_product_reval0}:
101
- standard_price == 35.00, "The standard price is reevaluate"