-
-
Notifications
You must be signed in to change notification settings - Fork 714
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] product_restricted_type: Migration to 17.0
- Loading branch information
1 parent
21ef635
commit 8609764
Showing
11 changed files
with
126 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
# Copyright 2018 ForgeFlow S.L. | ||
# Copyright 2018-2024 ForgeFlow S.L. | ||
# (http://www.forgeflow.com) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
{ | ||
"name": "Product Restricted Type", | ||
"version": "15.0.1.0.0", | ||
"version": "17.0.1.0.0", | ||
"author": "ForgeFlow," "Odoo Community Association (OCA)", | ||
"website": "https://github.com/OCA/product-attribute", | ||
"license": "AGPL-3", | ||
"category": "Product", | ||
"depends": ["product"], | ||
"data": ["views/product_views.xml"], | ||
"data": ["views/product_category_views.xml", "views/product_template_views.xml"], | ||
"auto_install": False, | ||
"installable": True, | ||
} |
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,4 +1,4 @@ | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from . import product_template | ||
from . import product | ||
from . import product_category |
2 changes: 1 addition & 1 deletion
2
product_restricted_type/models/product.py → ...estricted_type/models/product_category.py
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
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 +1,5 @@ | ||
To use this module, you need to go to Inventory -> Configuration -> Product Categories and set a Restricted Product Type. | ||
|
||
When a Restricted Product Type is assigned to a Product Category, if we then set a Product Type on a Product Template, | ||
the list of available Product Categories in the dropdown will be filtered with only the ones that have the same | ||
Restricted Product Type as the one set on the Product Template or have no Restricted Product Type set. |
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
2 changes: 1 addition & 1 deletion
2
...t_restricted_type/views/product_views.xml → ...ted_type/views/product_category_views.xml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo> | ||
<record id="product_template_only_form_view" model="ir.ui.view"> | ||
<field | ||
name="name" | ||
>product.template.product.form - product_restricted_type</field> | ||
<field name="model">product.template</field> | ||
<field name="inherit_id" ref="product.product_template_only_form_view" /> | ||
<field name="arch" type="xml"> | ||
<field name='categ_id' position="before"> | ||
<field name="allowed_categ_ids" invisible="1" /> | ||
</field> | ||
<field name='categ_id' position="attributes"> | ||
<attribute name="domain">[('id', 'in', allowed_categ_ids)]</attribute> | ||
</field> | ||
</field> | ||
</record> | ||
</odoo> |