Skip to content

Commit 352d9c9

Browse files
committed
[FIX] 3pl_logistic_company: fix + test for traceback
1 parent d607b7f commit 352d9c9

File tree

3 files changed

+48
-16
lines changed

3 files changed

+48
-16
lines changed

3pl_logistic_company/demo/stock_package.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
<field name="pack_date" eval="datetime.today().date() + relativedelta(days=-1)"/>
6161
<field name="package_type_id" ref="stock_package_type_1"/>
6262
</record>
63-
<!-- <record id="stock_package_10" model="stock.package">
63+
<record id="stock_package_10" model="stock.package">
6464
<field name="name">PAL_201</field>
6565
<field name="location_id" ref="import_shelf_0005"/>
6666
<field name="pack_date" eval="datetime.today().date() + relativedelta(days=-1)"/>
@@ -77,7 +77,7 @@
7777
<field name="location_id" ref="import_shelf_0005"/>
7878
<field name="pack_date" eval="datetime.today().date() + relativedelta(days=-1)"/>
7979
<field name="package_type_id" ref="stock_package_type_1"/>
80-
</record> -->
80+
</record>
8181
<record id="stock_package_14" model="stock.package">
8282
<field name="name">PAL_301</field>
8383
<field name="location_id" ref="import_shelf_0005"/>

3pl_logistic_company/demo/stock_picking.xml

Lines changed: 45 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
}]"/>
88
</function>
99

10-
<record id="stock_picking_in_2" model="stock.picking">
10+
<!-- <record id="stock_picking_in_2" model="stock.picking">
1111
<field name="picking_type_id" ref="stock.picking_type_in"/>
1212
<field name="move_type">direct</field>
1313
<field name="scheduled_date" eval="datetime.today().date() + relativedelta(days=2)"/>
@@ -36,7 +36,7 @@
3636
<value eval="[
3737
ref('stock_picking_in_2'),
3838
]"/>
39-
</function>
39+
</function> -->
4040

4141
<record id="stock_picking_in_12" model="stock.picking">
4242
<field name="picking_type_id" ref="stock.picking_type_in"/>
@@ -55,27 +55,37 @@
5555
<field name="move_line_ids" model="stock.move.line" eval="[(0, 0, {
5656
'product_id': obj().env.ref('3pl_logistic_company.product_product_2').id,
5757
'lot_id': obj().env.ref('3pl_logistic_company.stock_lot_6').id,
58+
'lot_name': obj().env.ref('3pl_logistic_company.stock_lot_6').name,
5859
'quantity': 40,
5960
})]"/>
6061
</record>
61-
<function name="button_validate" model="stock.picking">
62+
<function name="action_confirm" model="stock.picking">
6263
<value eval="[
6364
ref('stock_picking_in_12'),
6465
]"/>
6566
</function>
66-
<record id="stock_picking_in_12" model="stock.picking">
67+
<!-- <function name="button_validate" model="stock.picking">
68+
<value eval="[
69+
ref('stock_picking_in_12'),
70+
]"/>
71+
</function> -->
72+
<!-- <record id="stock_picking_in_12" model="stock.picking">
6773
<field name="date_done" eval="datetime.today().date() + relativedelta(days=-9, minutes=-1)"/>
6874
</record>
6975
<function name="do_pass" model="quality.check">
7076
<value model="quality.check" eval="obj().search([('picking_id', '=', ref('stock_picking_in_12'))], limit=1).id"/>
7177
</function>
78+
<function name="write" model="quality.check">
79+
<value model="quality.check" eval="obj().search([('picking_id', '=', ref('stock_picking_in_12'))], limit=1).id"/>
80+
<value eval="{'control_date': datetime.today().date() + relativedelta(days=-9, minutes=-1)}"/>
81+
</function>
7282
<function name="button_validate" model="stock.picking">
7383
<value model="stock.picking" eval="obj().search([('picking_type_id', '!=',ref('stock.picking_type_pick')), ('lot_id', '=', ref('stock_lot_6'))], limit=1).id"/>
7484
</function>
7585
<function name="write" model="stock.picking">
7686
<value model="stock.picking" eval="obj().search([('picking_type_id', '!=',ref('stock.picking_type_pick')), ('lot_id', '=', ref('stock_lot_6'))], limit=1).id"/>
7787
<value eval="{'date_done': datetime.today().date() + relativedelta(days=-9, minutes=-1), 'scheduled_date': datetime.today().date() + relativedelta(days=-9, minutes=-1)}"/>
78-
</function>
88+
</function> -->
7989

8090

8191
<record id="stock_picking_in_13" model="stock.picking">
@@ -88,17 +98,23 @@
8898
<field name="partner_id" ref="base_industry_data.res_partner_31"/>
8999
<field name="owner_id" ref="base_industry_data.res_partner_31"/>
90100
</record>
101+
<function name="action_confirm" model="stock.picking">
102+
<value eval="[
103+
ref('stock_picking_in_13'),
104+
]"/>
105+
</function>
91106
<record id="stock_move_67" model="stock.move">
92107
<field name="picking_id" ref="stock_picking_in_13"/>
93108
<field name="product_id" ref="product_product_3"/>
94109
<field name="product_uom_qty">140.0</field>
95110
<field name="move_line_ids" model="stock.move.line" eval="[(0, 0, {
96111
'product_id': obj().env.ref('3pl_logistic_company.product_product_3').id,
97112
'lot_id': obj().env.ref('3pl_logistic_company.stock_lot_5').id,
113+
'lot_name': obj().env.ref('3pl_logistic_company.stock_lot_5').name,
98114
'quantity': 140,
99115
})]"/>
100116
</record>
101-
<function name="button_validate" model="stock.picking">
117+
<!-- <function name="button_validate" model="stock.picking">
102118
<value eval="[
103119
ref('stock_picking_in_13'),
104120
]"/>
@@ -109,13 +125,21 @@
109125
<function name="do_pass" model="quality.check">
110126
<value model="quality.check" eval="obj().search([('picking_id', '=', ref('stock_picking_in_13'))], limit=1).id"/>
111127
</function>
128+
<function name="write" model="quality.check">
129+
<value model="quality.check" eval="obj().search([('picking_id', '=', ref('stock_picking_in_13'))], limit=1).id"/>
130+
<value eval="{'control_date': datetime.today().date() + relativedelta(days=-7)}"/>
131+
</function>
112132
<function name="button_validate" model="stock.picking">
113-
<value model="stock.picking" eval="obj().search([('picking_type_id', '!=',ref('stock.picking_type_pick')), ('lot_id', '=', ref('stock_lot_5'))], limit=1).id"/>
133+
<value model="stock.picking" eval="obj().search([('picking_type_id', '!=', ref('stock.picking_type_pick')), ('lot_id', '=', ref('stock_lot_5'))], limit=1).id"/>
114134
</function>
115135
<function name="write" model="stock.picking">
116-
<value model="stock.picking" eval="obj().search([('picking_type_id', '!=',ref('stock.picking_type_pick')), ('lot_id', '=', ref('stock_lot_5'))], limit=1).id"/>
136+
<value model="stock.picking" eval="obj().search([('picking_type_id', '!=', ref('stock.picking_type_pick')), ('lot_id', '=', ref('stock_lot_5'))], limit=1).id"/>
117137
<value eval="{'date_done': datetime.today().date() + relativedelta(days=-7), 'scheduled_date': datetime.today().date() + relativedelta(days=-7)}"/>
118-
</function>
138+
</function> -->
139+
<!-- <function name="write" model="stock.move.line">
140+
<value model="stock.move.line" eval="obj().search([('picking_type_id', '!=', ref('stock.picking_type_pick')), ('lot_id', '=', ref('stock_lot_5'))], limit=1).id"/>
141+
<value eval="{'result_package_id': ref('stock_package_22')}"/>
142+
</function> -->
119143

120144

121145

@@ -129,13 +153,19 @@
129153
<field name="partner_id" ref="base_industry_data.res_partner_32"/>
130154
<field name="owner_id" ref="base_industry_data.res_partner_32"/>
131155
</record>
156+
<function name="action_confirm" model="stock.picking">
157+
<value eval="[
158+
ref('stock_picking_in_14'),
159+
]"/>
160+
</function>
132161
<record id="stock_move_69" model="stock.move">
133162
<field name="picking_id" ref="stock_picking_in_14"/>
134163
<field name="product_id" ref="product_product_7"/>
135164
<field name="product_uom_qty">120.0</field>
136165
<field name="move_line_ids" model="stock.move.line" eval="[(0, 0, {
137166
'product_id': obj().env.ref('3pl_logistic_company.product_product_7').id,
138167
'lot_id': obj().env.ref('3pl_logistic_company.stock_lot_1').id,
168+
'lot_name': obj().env.ref('3pl_logistic_company.stock_lot_1').name,
139169
'quantity': 120,
140170
})]"/>
141171
</record>
@@ -146,6 +176,7 @@
146176
<field name="move_line_ids" model="stock.move.line" eval="[(0, 0, {
147177
'product_id': obj().env.ref('3pl_logistic_company.product_product_5').id,
148178
'lot_id': obj().env.ref('3pl_logistic_company.stock_lot_2').id,
179+
'lot_name': obj().env.ref('3pl_logistic_company.stock_lot_2').name,
149180
'quantity': 150,
150181
})]"/>
151182
</record>
@@ -156,10 +187,11 @@
156187
<field name="move_line_ids" model="stock.move.line" eval="[(0, 0, {
157188
'product_id': obj().env.ref('3pl_logistic_company.product_product_6').id,
158189
'lot_id': obj().env.ref('3pl_logistic_company.stock_lot_3').id,
190+
'lot_name': obj().env.ref('3pl_logistic_company.stock_lot_3').name,
159191
'quantity': 80,
160192
})]"/>
161193
</record>
162-
<function name="button_validate" model="stock.picking">
194+
<!-- <function name="button_validate" model="stock.picking">
163195
<value eval="[
164196
ref('stock_picking_in_14'),
165197
]"/>
@@ -173,9 +205,9 @@
173205
<function name="write" model="stock.picking">
174206
<value model="stock.picking" eval="obj().search([('picking_type_id', '!=',ref('stock.picking_type_pick')), ('lot_id', '=', ref('stock_lot_2'))], limit=1).id"/>
175207
<value eval="{'date_done': datetime.today().date() + relativedelta(days=-9), 'scheduled_date': datetime.today().date() + relativedelta(days=-9)}"/>
176-
</function>
208+
</function> -->
177209

178-
<record id="stock_picking_in_15" model="stock.picking">
210+
<!-- <record id="stock_picking_in_15" model="stock.picking">
179211
<field name="picking_type_id" ref="stock.picking_type_in"/>
180212
<field name="move_type">direct</field>
181213
<field name="scheduled_date" eval="datetime.today().date() + relativedelta(days=3)"/>
@@ -194,7 +226,7 @@
194226
<value eval="[
195227
ref('stock_picking_in_15'),
196228
]"/>
197-
</function>
229+
</function> -->
198230

199231

200232
<record id="stock_picking_pick_2" model="stock.picking">
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version='1.0' encoding='UTF-8'?>
22
<odoo>
3-
<!-- <function name="button_choose_theme" model="ir.module.module" eval="[ref('base.module_theme_buzzy', raise_if_not_found=False) or ref('base.module_theme_default')]"/> -->
3+
<function name="button_choose_theme" model="ir.module.module" eval="[ref('base.module_theme_buzzy', raise_if_not_found=False) or ref('base.module_theme_default')]"/>
44
</odoo>

0 commit comments

Comments
 (0)