From 5cf816adbc53c617b7cd3046273d89a05c1d471b Mon Sep 17 00:00:00 2001 From: docker-odoo Date: Thu, 21 Nov 2024 18:18:46 +0000 Subject: [PATCH 1/3] [MIG] base_multi_store: Migration to 18.0 --- base_multi_store/__manifest__.py | 4 ++-- base_multi_store/demo/res_store_demo.xml | 2 -- base_multi_store/models/res_store.py | 2 +- base_multi_store/views/res_store_view.xml | 8 ++++---- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/base_multi_store/__manifest__.py b/base_multi_store/__manifest__.py index fabae97..3db54c9 100644 --- a/base_multi_store/__manifest__.py +++ b/base_multi_store/__manifest__.py @@ -19,7 +19,7 @@ ############################################################################## { 'name': 'Multi Stores Management', - 'version': "17.0.1.0.0", + 'version': "18.0.1.0.0", 'category': 'Accounting', 'sequence': 14, 'summary': '', @@ -40,7 +40,7 @@ 'demo': [ 'demo/res_store_demo.xml', ], - 'installable': False, + 'installable': True, 'auto_install': False, 'application': True, } diff --git a/base_multi_store/demo/res_store_demo.xml b/base_multi_store/demo/res_store_demo.xml index 234d9fe..75e6eac 100644 --- a/base_multi_store/demo/res_store_demo.xml +++ b/base_multi_store/demo/res_store_demo.xml @@ -8,13 +8,11 @@ Rosario - Buenos Aires - diff --git a/base_multi_store/models/res_store.py b/base_multi_store/models/res_store.py index f884908..368e8db 100644 --- a/base_multi_store/models/res_store.py +++ b/base_multi_store/models/res_store.py @@ -48,7 +48,7 @@ class ResStore(models.Model): @api.constrains('parent_id') def _check_parent_id(self): for rec in self: - if not rec._check_recursion(): + if rec._has_cycle(): raise ValidationError( _('Error! You can not create recursive stores.')) diff --git a/base_multi_store/views/res_store_view.xml b/base_multi_store/views/res_store_view.xml index b6e9ceb..1644075 100644 --- a/base_multi_store/views/res_store_view.xml +++ b/base_multi_store/views/res_store_view.xml @@ -2,14 +2,14 @@ - res.store.tree + res.store.list res.store - + - + @@ -48,7 +48,7 @@ Stores ir.actions.act_window res.store - tree,form + list,form From 0d2f7aad8517902972bbeaae8c634aa0253a2079 Mon Sep 17 00:00:00 2001 From: Matias Peralta Date: Thu, 21 Nov 2024 16:32:33 -0300 Subject: [PATCH 2/3] [MIG] stock_multi_store: Migration to 18.0 --- account_multi_store/models/account_journal.py | 4 ++-- stock_multi_store/__manifest__.py | 4 ++-- stock_multi_store/models/stock_picking_type.py | 4 ++-- stock_multi_store/models/stock_warehouse.py | 4 ++-- stock_multi_store/views/res_store_view.xml | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/account_multi_store/models/account_journal.py b/account_multi_store/models/account_journal.py index e680ae8..6fd1666 100644 --- a/account_multi_store/models/account_journal.py +++ b/account_multi_store/models/account_journal.py @@ -17,7 +17,7 @@ class AccountJournal(models.Model): ) @api.model - def _search(self, args, offset=0, limit=None, order=None, access_rights_uid=None): + def _search(self, args, offset=0, limit=None, order=None): """ Para que los usuarios no puedan elegir diarios donde no puedan escribir, modificamos la funcion search. No lo hacemos por regla de @@ -28,4 +28,4 @@ def _search(self, args, offset=0, limit=None, order=None, access_rights_uid=None # if superadmin, do not apply if not self.env.is_superuser(): args += ['|', ('store_id', '=', False), ('store_id', 'child_of', [user.store_id.id])] - return super()._search(args, offset, limit, order, access_rights_uid=access_rights_uid) + return super()._search(args, offset, limit, order) diff --git a/stock_multi_store/__manifest__.py b/stock_multi_store/__manifest__.py index 479ac0d..dcf4c26 100644 --- a/stock_multi_store/__manifest__.py +++ b/stock_multi_store/__manifest__.py @@ -19,7 +19,7 @@ ############################################################################## { 'name': 'Multi Store for Warehouse', - 'version': "17.0.1.0.0", + 'version': "18.0.1.0.0", 'category': 'Accounting', 'sequence': 14, 'summary': '', @@ -44,7 +44,7 @@ ], 'test': [ ], - 'installable': False, + 'installable': True, 'auto_install': True, 'application': False, } diff --git a/stock_multi_store/models/stock_picking_type.py b/stock_multi_store/models/stock_picking_type.py index f28cad3..1fe4afd 100644 --- a/stock_multi_store/models/stock_picking_type.py +++ b/stock_multi_store/models/stock_picking_type.py @@ -19,7 +19,7 @@ def write(self, vals): return super().write(vals) @api.model - def _search(self, args, offset=0, limit=None, order=None, access_rights_uid=None): + def _search(self, args, offset=0, limit=None, order=None): """ Para que los usuarios no puedan elegir pickings donde no puedan escribir, modificamos la funcion search. No lo hacemos por regla de @@ -30,4 +30,4 @@ def _search(self, args, offset=0, limit=None, order=None, access_rights_uid=None # if superadmin, do not apply if not self.env.is_superuser(): args += ['|', ('store_id', '=', False), ('store_id', 'child_of', [user.store_id.id])] - return super()._search(args, offset, limit, order, access_rights_uid=access_rights_uid) + return super()._search(args, offset, limit, order) diff --git a/stock_multi_store/models/stock_warehouse.py b/stock_multi_store/models/stock_warehouse.py index 1fa5ffb..87ecd7b 100644 --- a/stock_multi_store/models/stock_warehouse.py +++ b/stock_multi_store/models/stock_warehouse.py @@ -22,7 +22,7 @@ def write(self, vals): return super().write(vals) @api.model - def _search(self, args, offset=0, limit=None, order=None, access_rights_uid=None): + def _search(self, args, offset=0, limit=None, order=None): """ Para que los usuarios no puedan elegir almacenes donde no puedan escribir, modificamos la funcion search. No lo hacemos por regla de @@ -34,4 +34,4 @@ def _search(self, args, offset=0, limit=None, order=None, access_rights_uid=None # we use limit to control if the call is calling from a interface, and if not we need to not restring the domain if limit and not self.env.is_superuser(): args += ['|', ('store_id', '=', False), ('store_id', 'child_of', [user.store_id.id])] - return super()._search(args, offset, limit, order, access_rights_uid=access_rights_uid) + return super()._search(args, offset, limit, order) diff --git a/stock_multi_store/views/res_store_view.xml b/stock_multi_store/views/res_store_view.xml index 6180b45..de11bbf 100644 --- a/stock_multi_store/views/res_store_view.xml +++ b/stock_multi_store/views/res_store_view.xml @@ -12,7 +12,7 @@ class="oe_inline oe_stat_button" name="%(stock.action_warehouse_form)d" type="action" - context="{'search_default_store_id': active_id}" + context="{'search_default_store_id': id}" icon="fa-home"> From 39879e8ff48732a1f3a34a293860af52c6a85e08 Mon Sep 17 00:00:00 2001 From: Matias Peralta Date: Tue, 26 Nov 2024 10:02:34 -0300 Subject: [PATCH 3/3] [MIG] purchase_multi_store: Migration to 18.0 --- purchase_multi_store/__manifest__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/purchase_multi_store/__manifest__.py b/purchase_multi_store/__manifest__.py index 8eaf95e..c011859 100644 --- a/purchase_multi_store/__manifest__.py +++ b/purchase_multi_store/__manifest__.py @@ -19,7 +19,7 @@ ############################################################################## { 'name': 'Multi Store for Purchase', - 'version': "17.0.1.0.0", + 'version': "18.0.1.0.0", 'category': 'Accounting', 'sequence': 14, 'summary': '', @@ -30,7 +30,7 @@ ], 'depends': [ 'purchase_stock', - 'base_multi_store', + 'stock_multi_store', ], 'data': [ 'views/purchase_order_views.xml', @@ -38,7 +38,7 @@ ], 'demo': [ ], - 'installable': False, + 'installable': True, 'auto_install': True, 'application': False, }