Skip to content

Commit

Permalink
[MIG] default_warehouse_from_sale_team: Migration to 17.0
Browse files Browse the repository at this point in the history
- Adapt the use of name_get as part of [1].
- Change qty_done to quantity and picked = True as part of [2].

[1] odoo/odoo#122085
[2] odoo/odoo#137864
  • Loading branch information
xmglord authored and luisg123v committed Apr 4, 2024
1 parent 1bc8ca1 commit 3805376
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion default_warehouse_from_sale_team/__manifest__.py
Expand Up @@ -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",
Expand Down
12 changes: 3 additions & 9 deletions default_warehouse_from_sale_team/models/account_journal.py
Expand Up @@ -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)
Expand Up @@ -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()

0 comments on commit 3805376

Please sign in to comment.