2
In order to test Sales Order Follow-up, I create initial data
6
!record {model: res.partner, id: supplier1}:
11
I create an address for Supplier 1
13
!record {model: res.partner.address, id: supplier1_addr}:
19
!record {model: res.partner, id: customer1}:
22
partner_type: internal
24
I create an address for Customer 1
26
!record {model: res.partner.address, id: customer1_addr}:
30
I create a product category
32
!record {model: product.category, id: prod_cat1}:
35
I create the product P1
37
!record {model: product.product, id: product1}:
43
procure_method: make_to_order
44
property_stock_inventory: stock.location_inventory
45
property_stock_procurement: stock.location_procurement
46
property_stock_production: stock.location_production
48
standard_price: 75000.00
51
uom_id: product.product_uom_unit
52
uom_po_id: product.product_uom_unit
61
international_status: product_attributes.int_1
63
I create a second product, P2
65
!record {model: product.product, id: product2}:
71
procure_method: make_to_stock
72
property_stock_inventory: stock.location_inventory
73
property_stock_procurement: stock.location_procurement
74
property_stock_production: stock.location_production
79
uom_id: product.product_uom_unit
80
uom_po_id: product.product_uom_unit
85
international_status: product_attributes.int_1
87
I create the product P3
89
!record {model: product.product, id: product3}:
95
procure_method: make_to_stock
96
property_stock_inventory: stock.location_inventory
97
property_stock_procurement: stock.location_procurement
98
property_stock_production: stock.location_production
100
standard_price: 100.0
103
uom_id: product.product_uom_unit
104
uom_po_id: product.product_uom_unit
109
international_status: product_attributes.int_1
111
I create the product P4
113
!record {model: product.product, id: product4}:
115
cost_method: standard
119
procure_method: make_to_order
120
property_stock_inventory: stock.location_inventory
121
property_stock_procurement: stock.location_procurement
122
property_stock_production: stock.location_production
124
standard_price: 7200.0
127
uom_id: product.product_uom_unit
128
uom_po_id: product.product_uom_unit
137
international_status: product_attributes.int_1
139
I create Physical Inventory for the products.
141
!record {model: stock.inventory, id: stock_inventory_physicalinventoy0}:
142
company_id: base.main_company
143
date: !eval time.strftime('%Y-%m-%d %H:%M:%S')
144
date_done: !eval time.strftime('%Y-%m-%d %H:%M:%S')
146
- company_id: base.main_company
147
location_id: stock.stock_location_stock
150
product_uom: product.product_uom_unit
151
name: Physical inventory
154
I confirm the Inventory for P3
156
!python {model: stock.inventory}: |
157
self.action_confirm(cr,uid,[ref('stock_inventory_physicalinventoy0')])
158
self.action_done(cr,uid,[ref('stock_inventory_physicalinventoy0')])