Skip to content

Commit

Permalink
[MIG] product_code_unique: migrate to V17
Browse files Browse the repository at this point in the history
  • Loading branch information
astirpe committed Mar 29, 2024
1 parent 3c67b48 commit bddc095
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion product_code_unique/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"name": "Unique Product Internal Reference",
"summary": "Set Product Internal Reference as Unique",
"version": "16.0.1.0.1",
"version": "17.0.1.0.0",
"license": "AGPL-3",
"author": "Open Source Integrators, Odoo Community Association (OCA)",
"category": "Product",
Expand Down
4 changes: 2 additions & 2 deletions product_code_unique/hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).


def pre_init_product_code(cr):
cr.execute(
def pre_init_product_code(env):
env.cr.execute(
"""UPDATE product_product
SET default_code = 'DEFAULT' || nextval('ir_default_id_seq')
WHERE id in (SELECT distinct(pp.id)
Expand Down

0 comments on commit bddc095

Please sign in to comment.