-
-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] product_barcode_constraint_per_company: change old method
Update oca_dependencies file Fix tests
- Loading branch information
1 parent
ea2cf9d
commit 21f10bb
Showing
8 changed files
with
91 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
product_barcode_constraint_per_company/readme/CONTRIBUTORS.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
* Sylvain LE GAL <https://twitter.com/legalsylvain> | ||
* Sulivan Lominchar <slominchar@archeti.com> | ||
* Ooops <https://ooops404.com> | ||
* Francesco Foresti <francesco.foresti@ooops404.com> | ||
* Cetmix <https://cetmix.com> | ||
* Dessan Hemrayev <dessanhemrayev@gmail.com> |
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Copyright 2023 Cetmix OÜ | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
from odoo.tests import SavepointCase, tagged | ||
|
||
|
||
@tagged("post_install", "-at_install") | ||
class CommonProductBarcodeConstraintPerCompany(SavepointCase): | ||
@classmethod | ||
def setUpClass(cls): | ||
super().setUpClass() | ||
cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True)) | ||
cls.product_product_obj = cls.env["product.product"] | ||
cls.res_company_obj = cls.env["res.company"] | ||
cls.company_1 = cls.res_company_obj.create({"name": "Company 1"}) | ||
cls.company_2 = cls.res_company_obj.create({"name": "Company 2"}) | ||
|
||
@classmethod | ||
def _create_product(cls, name, company_id): | ||
return cls.product_product_obj.create( | ||
{ | ||
"name": name, | ||
"company_id": company_id, | ||
"barcode": "978020137963", | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters