When users try to uninstall the "point_of_sale", a traceback will be generated. Error: TypeError: uninstall_hook() missing 1 required positional argument: 'registry' This is because the https://github.com/odoo/odoo/pull/138189 added the unistallhook from 16, but in the forword port of this PR, it did not change the argument list according to the new unistall hook from saas-16.2. This commit fixes the above issue by passing a valid argument in the unistill hook. code reference: https://github.com/odoo/odoo/blob/saas-16.2/addons/point_of_sale/__init__.py#L11 sentry-4586084597 closes odoo/odoo#140591 X-original-commit: 9eda662a89943f3c6725e223bf30238ef8e661f2 Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com> Signed-off-by: Pradip Yenpure (prye) <prye@odoo.com>
13 lines
474 B
Python
13 lines
474 B
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from . import models
|
|
from . import controllers
|
|
from . import report
|
|
from . import wizard
|
|
|
|
|
|
def uninstall_hook(env):
|
|
#The search domain is based on how the sequence is defined in the _get_sequence_values method in /addons/point_of_sale/models/stock_warehouse.py
|
|
env['ir.sequence'].search([('name', 'ilike', '%Picking POS%'), ('prefix', 'ilike', '%/POS/%')]).unlink()
|