2
Creating a res.partner record
4
!record {model: res.partner, id: res_partner_partnertest0}:
12
Creating a res.partner.address record
14
!record {model: res.partner.address, id: res_partner_address_0}:
15
partner_id: res_partner_partnertest0
20
Creating a product.nomenclature record
22
!record {model: product.nomenclature, id: product_nomenclature_nomenclaturetest0}:
24
name: nomenclature test 1
28
Creating a product.nomenclature record
30
!record {model: product.nomenclature, id: product_nomenclature_nomenclaturetest1}:
33
name: nomenclature test 2
34
parent_id: product_nomenclature_nomenclaturetest0
38
Creating a product.nomenclature record
40
!record {model: product.nomenclature, id: product_nomenclature_nomenclaturetest2}:
43
name: nomenclature test 3
44
parent_id: product_nomenclature_nomenclaturetest1
48
Creating a product.nomenclature record
50
!record {model: product.nomenclature, id: product_nomenclature_nomenclaturetest3}:
53
name: nomenclature test 4
54
parent_id: product_nomenclature_nomenclaturetest2
58
Creating a product.category record
60
!record {model: product.category, id: product_category_allproducts0}:
66
Creating a product.product record
68
!record {model: product.product, id: product_product_producttest0}:
69
categ_id: product_category_allproducts0
73
name_template: product test
74
nomen_c_manda_0: TEST-1
75
nomen_c_manda_1: TEST-2
76
nomen_c_manda_2: TEST-3
77
nomen_c_manda_3: TEST-4
78
nomen_manda_0: product_nomenclature_nomenclaturetest0
79
nomen_manda_1: product_nomenclature_nomenclaturetest1
80
nomen_manda_2: product_nomenclature_nomenclaturetest2
81
nomen_manda_3: product_nomenclature_nomenclaturetest3
82
procure_method: make_to_stock
88
uom_id: product.product_uom_unit
89
uom_po_id: product.product_uom_unit
90
valuation: manual_periodic
99
I check the onchange function, product_nomenclature.onChangeParentId
102
!python {model: product.nomenclature}: |
103
nom = self.browse(cr, uid, ref("product_nomenclature_nomenclaturetest3"))
105
result = nom.onChangeParentId('mandatory', ref("product_nomenclature_nomenclaturetest2"))
107
assert nom.level == result['value']['level'], 'level wrong'
112
I check the onchange function, product_product.codeChange
115
!python {model: product.product}: |
116
product = self.browse(cr, uid, ref("product_product_producttest0"))
118
result = product.codeChange(0, 'TEST-1', 'mandatory',
119
ref("product_nomenclature_nomenclaturetest0"), False, False, False, {'test':'test'},False,False,False,False,False,False)
121
assert result['value']['nomen_manda_0'] == ref("product_nomenclature_nomenclaturetest0"), 'codeChange wrong'