Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stock_multi_store/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
"name": "Multi Store for Warehouse",
"version": "18.0.1.4.0",
"version": "18.0.1.4.1",
"category": "Accounting",
"sequence": 14,
"summary": "",
Expand Down
25 changes: 25 additions & 0 deletions stock_multi_store/migrations/18.0.1.4.1/pre-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from openupgradelib import openupgrade


@openupgrade.migrate()
def migrate(env, version):
domain_force = (
"['|', ('picking_type_id.code', '=', 'dropship'), "
"'|', ('picking_type_id.warehouse_id', '=', False), "
"'|', ('picking_type_id.warehouse_id.store_id', '=', False), "
"('picking_type_id.warehouse_id.store_id', 'child_of', "
"user.store_ids.ids)]"
)
openupgrade.logged_query(
env.cr,
"""
UPDATE ir_rule rule
SET domain_force = %s
FROM ir_model_data data
WHERE data.model = 'ir.rule'
AND data.module = 'stock_multi_store'
AND data.name = 'stock_picking_store_rule'
AND data.res_id = rule.id
""",
(domain_force,),
)
2 changes: 1 addition & 1 deletion stock_multi_store/security/multi_store_security.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
<field name="model_id" ref="stock.model_stock_picking"/>
<field name="global" eval="True"/>
<field name="perm_read" eval="False"/>
<field name="domain_force">['|', ('picking_type_id.code','=','dropship'),'|',('picking_type_id.warehouse_id.store_id','=',False),('picking_type_id.warehouse_id.store_id','child_of',user.store_ids.ids)]</field>
<field name="domain_force">['|', ('picking_type_id.code', '=', 'dropship'), '|', ('picking_type_id.warehouse_id', '=', False), '|', ('picking_type_id.warehouse_id.store_id', '=', False), ('picking_type_id.warehouse_id.store_id', 'child_of', user.store_ids.ids)]</field>
Comment thread
rov-adhoc marked this conversation as resolved.
Comment thread
rov-adhoc marked this conversation as resolved.
</record>
</odoo>