Skip to content

Commit 0aa7eeb

Browse files
committed
[FIX] {*}: new handling of picking type prefix/sequence code
Caused by: odoo/odoo@3081bcd `sequence_code` being processed differently made domains with 'sequence_code', '=', 'XXX' not capture the proper elements. Fixed said domains and fixed industries setting their own sequence codes/route prefixes so they display correctly
1 parent 0058ecb commit 0aa7eeb

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

dropshipping/data/stock_picking_type.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<odoo noupdate="1">
33
<record id="stock_picking_type_9" model="stock.picking.type">
44
<field name="name">Dropship</field>
5-
<field name="sequence_code">DS</field>
5+
<field name="sequence_code">WH/DS/</field>
66
<field name="code">dropship</field>
77
<field name="default_location_src_id" ref="stock.stock_location_suppliers"/>
88
<field name="default_location_dest_id" ref="stock.stock_location_customers"/>

it_hardware/data/stock_picking_type.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<record id="stock_picking_type_repair_part" model="stock.picking.type">
44
<field name="name">Repair Parts</field>
55
<field name="code">incoming</field>
6-
<field name="sequence_code">REP</field>
6+
<field name="sequence_code">WH/REP/</field>
77
<field name="warehouse_id" ref="stock.warehouse0"/>
88
</record>
99
</odoo>

library/data/ir_actions_act_window.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
(0, 0, {'view_mode': 'kanban', 'view_id': ref('stock_picking_kanban_view')}),
1515
(0, 0, {'view_mode': 'list', 'view_id': ref('stock_picking_list_view_inherit')}),
1616
]"/>
17-
<field name="domain" eval="[('picking_type_id.sequence_code', '=', 'RET'), ('state', 'in', ['confirmed', 'assigned', 'waiting'])]"/>
17+
<field name="domain" eval="[('picking_type_id.sequence_code', 'like', '/RET/'), ('state', 'in', ['confirmed', 'assigned', 'waiting'])]"/>
1818
<field name="view_mode">kanban,list,form,calendar,map,activity</field>
1919
</record>
2020
</odoo>

library/data/stock_picking_type.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
<odoo noupdate="1" auto_sequence="1">
33
<record id="stock_picking_type_10" model="stock.picking.type">
44
<field name="name">Return</field>
5-
<field name="sequence_code">RET</field>
5+
<field name="sequence_code">WH/RET/</field>
66
<field name="default_location_src_id" ref="stock_location_17"/>
77
<field name="warehouse_id" ref="stock.warehouse0"/>
88
</record>
99
<function name="write" model="stock.picking.type">
10-
<value model="stock.picking.type" eval="obj().search([('sequence_code', '=', 'POS')]).ids" />
10+
<value model="stock.picking.type" eval="obj().search([('sequence_code', 'like', '/POS/')]).ids" />
1111
<value eval="{'default_location_dest_id': ref('stock_location_17')}"/>
1212
</function>
1313
<function name="write" model="stock.picking.type">
14-
<value model="stock.picking.type" eval="obj().search([('sequence_code', '=', 'POS')]).ids" />
14+
<value model="stock.picking.type" eval="obj().search([('sequence_code', 'like', '/POS/')]).ids" />
1515
<value eval="{'x_overrule_customer_location': True}"/>
1616
</function>
1717
</odoo>

machine_tool_rental/data/quality_point.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<field name="title">Return Check</field>
66
<field name="product_category_ids" eval="[(6, 0, [ref('product_category_7'), ref('product_category_6')])]"/>
77
<field name="failure_location_ids" eval="[(6, 0, [ref('stock_location_18')])]"/>
8-
<field name="picking_type_ids" search="[('sequence_code', '=', 'STOR')]"/>
8+
<field name="picking_type_ids" search="[('sequence_code', 'like', '/STOR/')]"/>
99
<field name="note"><![CDATA[<div data-oe-version=\"2.0\">Is machine/tool&nbsp;ready for rental?<br>If not, a maintenance task will be created.</div>
1010
]]></field>
1111
<field name="measure_on">move_line</field>

machine_tool_rental/data/stock_rule.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<field name="procure_method">make_to_order</field>
1717
<field name="delay">2</field>
1818
<field name="warehouse_id" ref="stock.warehouse0"/>
19-
<field name="picking_type_id" search="[('sequence_code', '=', 'STOR')]"/>
19+
<field name="picking_type_id" search="[('sequence_code', 'like', '/STOR/')]"/>
2020
<field name="route_id" model="stock.rule" eval="obj().search([('action', '=', 'push')]).route_id"/>
2121
<field name="push_domain" eval="[('product_id.categ_id', '=', ref('product_category_7'))]"/>
2222
</record>
@@ -25,7 +25,7 @@
2525
<field name="action">push</field>
2626
<field name="location_dest_id" ref="stock.stock_location_stock"/>
2727
<field name="location_src_id" ref="stock.stock_location_company"/>
28-
<field name="picking_type_id" search="[('sequence_code', '=', 'STOR')]"/>
28+
<field name="picking_type_id" search="[('sequence_code', 'like', '/STOR/')]"/>
2929
<field name="route_id" model="stock.rule" eval="obj().env.ref('machine_tool_rental.stock_rule_9').route_id"/>
3030
<field name="procure_method">make_to_order</field>
3131
<field name="delay">1</field>

0 commit comments

Comments
 (0)