Skip to content

Commit

Permalink
[MIG] barcode_action: Migration to 18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jmartinacu committed Jan 27, 2025
1 parent 63a1cb3 commit 95f353e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion barcode_action/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{
"name": "Barcode action launcher",
"version": "17.0.1.0.0",
"version": "18.0.1.0.0",
"category": "Extra Tools",
"website": "https://github.com/OCA/server-ux",
"author": "Creu Blanca, ForgeFlow, Odoo Community Association (OCA)",
Expand Down
4 changes: 2 additions & 2 deletions barcode_action/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
import json

from odoo import _, models
from odoo import models
from odoo.tools.safe_eval import safe_eval


Expand All @@ -19,7 +19,7 @@ def find_res_partner_by_ref_using_barcode(self, barcode):
context.update(
{
"default_state": "warning",
"default_status": _(
"default_status": self.env._(
"Partner with Internal Reference " "%s cannot be found"
)
% barcode,
Expand Down
2 changes: 0 additions & 2 deletions barcode_action/static/src/js/action_barcode_widget.esm.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/** @odoo-module **/

import {registry} from "@web/core/registry";
import {standardFieldProps} from "@web/views/fields/standard_field_props";
import {useBus, useService} from "@web/core/utils/hooks";
Expand Down
11 changes: 7 additions & 4 deletions barcode_action/tests/test_partner_find.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@ def test_partner(self):
# We should find the partner when the ref is found
self.assertEqual(
partner.id,
partner_obj.find_res_partner_by_ref_using_barcode(ref).get("res_id", False),
partner_obj.find_res_partner_by_ref_using_barcode(ref).get(
"res_id",
False,
),
)
# No partner is found, then there is no res_id on the result
self.assertFalse(
partner_obj.find_res_partner_by_ref_using_barcode(f"{ref}-{ref}").get(
"res_id", False
)
partner_obj.find_res_partner_by_ref_using_barcode(
f"{ref}-{ref}",
).get("res_id", False)
)

0 comments on commit 95f353e

Please sign in to comment.