diff --git a/default_warehouse_from_sale_team/__manifest__.py b/default_warehouse_from_sale_team/__manifest__.py index f0310dce5ce..9de869d041a 100644 --- a/default_warehouse_from_sale_team/__manifest__.py +++ b/default_warehouse_from_sale_team/__manifest__.py @@ -8,7 +8,7 @@ "website": "http://www.vauxoo.com", "license": "LGPL-3", "category": "Inventory/Inventory", - "version": "16.0.1.0.0", + "version": "17.0.1.0.0", "depends": [ "sale_stock", "purchase_requisition", diff --git a/default_warehouse_from_sale_team/models/account_journal.py b/default_warehouse_from_sale_team/models/account_journal.py index 4d82cd81c7d..24955cfea80 100644 --- a/default_warehouse_from_sale_team/models/account_journal.py +++ b/default_warehouse_from_sale_team/models/account_journal.py @@ -5,12 +5,6 @@ class AccountJournal(models.Model): _inherit = "account.journal" section_id = fields.Many2one("crm.team", string="Sales Team") - - def name_get(self): - """Avoid access errors when computing journal's display name - - Avoid access errors when user has access to a journal item but not to its journal, e.g. when - reconciling bank statements. - """ - self = self.sudo() - return super().name_get() + # Avoid access errors when user has access to a journal item but + # not to its journal, e.g. when reconciling bank statements. + display_name = fields.Char(compute="_compute_display_name", compute_sudo=True) diff --git a/default_warehouse_from_sale_team/tests/test_default_warehouse.py b/default_warehouse_from_sale_team/tests/test_default_warehouse.py index 5e565deb245..eb3df4cd5a9 100644 --- a/default_warehouse_from_sale_team/tests/test_default_warehouse.py +++ b/default_warehouse_from_sale_team/tests/test_default_warehouse.py @@ -121,5 +121,5 @@ def test_04_warehouse_team_sale_policy(self): sale.sudo().action_confirm() pick = sale.picking_ids pick.action_assign() - pick.move_ids.write({"quantity_done": 1}) + pick.move_ids.write({"quantity": 1, "picked": True}) pick.button_validate()