Skip to content

Commit b11f93d

Browse files
authored
Merge pull request #1417 from OCA/18.0
Syncing from upstream OCA/product-attribute (18.0)
2 parents d88c08a + 2b9ad12 commit b11f93d

23 files changed

Lines changed: 1068 additions & 1 deletion

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ addon | version | maintainers | summary
3333
[product_category_name_translatable](product_category_name_translatable/) | 18.0.1.0.0 | | Translate Product Category Names
3434
[product_category_product_link](product_category_product_link/) | 18.0.1.0.0 | | Allows to get products from a category
3535
[product_category_tag](product_category_tag/) | 18.0.1.0.0 | <a href='https://github.com/ppyczko'><img src='https://github.com/ppyczko.png' width='32' height='32' style='border-radius:50%;' alt='ppyczko'/></a> | Add tags to product categories
36+
[product_category_type](product_category_type/) | 18.0.1.0.0 | <a href='https://github.com/legalsylvain'><img src='https://github.com/legalsylvain.png' width='32' height='32' style='border-radius:50%;' alt='legalsylvain'/></a> | Add Type field on Product Categories to distinguish between parent and final categories
3637
[product_category_uom](product_category_uom/) | 18.0.1.0.0 | | Define default product UoM at product category level
3738
[product_code_unique](product_code_unique/) | 18.0.1.0.0 | | Set Product Internal Reference as Unique
3839
[product_company_default](product_company_default/) | 18.0.1.0.0 | | Product Company Default

product_category_type/README.rst

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
.. image:: https://odoo-community.org/readme-banner-image
2+
:target: https://odoo-community.org/get-involved?utm_source=readme
3+
:alt: Odoo Community Association
4+
5+
=====================
6+
Product Category Type
7+
=====================
8+
9+
..
10+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
11+
!! This file is generated by oca-gen-addon-readme !!
12+
!! changes will be overwritten. !!
13+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14+
!! source digest: sha256:e28ecbcfbfea532bb75bcf484f40b4ce595e5564f3dfaea7b0668f22cba5b4cd
15+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16+
17+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
18+
:target: https://odoo-community.org/page/development-status
19+
:alt: Beta
20+
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
21+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
22+
:alt: License: AGPL-3
23+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproduct--attribute-lightgray.png?logo=github
24+
:target: https://github.com/OCA/product-attribute/tree/18.0/product_category_type
25+
:alt: OCA/product-attribute
26+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
27+
:target: https://translation.odoo-community.org/projects/product-attribute-18-0/product-attribute-18-0-product_category_type
28+
:alt: Translate me on Weblate
29+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
30+
:target: https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&target_branch=18.0
31+
:alt: Try me on Runboat
32+
33+
|badge1| |badge2| |badge3| |badge4| |badge5|
34+
35+
Add 'Type' field on Product Categories to distinguish between parent and
36+
final categories.
37+
38+
figure:: ../static/description/product_category_tree.png
39+
40+
- Categories (type view) can contain only categories.
41+
- Categories (type normal) can contain only products.
42+
43+
It is so impossible to select a category (type view) in the product
44+
template form view.
45+
46+
figure:: ../static/description/product_template_form.png
47+
48+
Note
49+
----
50+
51+
This module restores a feature that was present in Odoo Community
52+
Edition until the V10 revision.
53+
54+
Ref:
55+
https://github.com/odoo/odoo/blob/10.0/addons/product/models/product.py#L24
56+
57+
**Table of contents**
58+
59+
.. contents::
60+
:local:
61+
62+
Bug Tracker
63+
===========
64+
65+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/product-attribute/issues>`_.
66+
In case of trouble, please check there if your issue has already been reported.
67+
If you spotted it first, help us to smash it by providing a detailed and welcomed
68+
`feedback <https://github.com/OCA/product-attribute/issues/new?body=module:%20product_category_type%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
69+
70+
Do not contact contributors directly about support or help with technical issues.
71+
72+
Credits
73+
=======
74+
75+
Authors
76+
-------
77+
78+
* GRAP
79+
80+
Contributors
81+
------------
82+
83+
- Sylvain LE GAL (https://www.twitter.com/legalsylvain)
84+
- Fabian Semal (fabian@digital-serenity.net)
85+
86+
Maintainers
87+
-----------
88+
89+
This module is maintained by the OCA.
90+
91+
.. image:: https://odoo-community.org/logo.png
92+
:alt: Odoo Community Association
93+
:target: https://odoo-community.org
94+
95+
OCA, or the Odoo Community Association, is a nonprofit organization whose
96+
mission is to support the collaborative development of Odoo features and
97+
promote its widespread use.
98+
99+
.. |maintainer-legalsylvain| image:: https://github.com/legalsylvain.png?size=40px
100+
:target: https://github.com/legalsylvain
101+
:alt: legalsylvain
102+
103+
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
104+
105+
|maintainer-legalsylvain|
106+
107+
This module is part of the `OCA/product-attribute <https://github.com/OCA/product-attribute/tree/18.0/product_category_type>`_ project on GitHub.
108+
109+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

product_category_type/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright 2021 Sylvain LE GAL (https://twitter.com/legalsylvain)
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3+
4+
{
5+
"name": "Product Category Type",
6+
"summary": """
7+
Add Type field on Product Categories
8+
to distinguish between parent and final categories""",
9+
"version": "18.0.1.0.0",
10+
"license": "AGPL-3",
11+
"author": "GRAP,Odoo Community Association (OCA)",
12+
"maintainers": ["legalsylvain"],
13+
"website": "https://github.com/OCA/product-attribute",
14+
"depends": [
15+
"product",
16+
],
17+
"data": [
18+
"views/product_category.xml",
19+
],
20+
"demo": [
21+
"demo/product_category.xml",
22+
],
23+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<!-- Copyright 2021 Sylvain LE GAL (https://twitter.com/legalsylvain)
3+
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
4+
<odoo>
5+
<record model="product.category" id="category_view">
6+
<field name="name">Demo Parent Category (Type View)</field>
7+
<field name="type">view</field>
8+
</record>
9+
10+
<record model="product.category" id="category_normal_1">
11+
<field name="name">Demo Category 1 (Type Normal)</field>
12+
<field name="type">normal</field>
13+
<field name="parent_id" ref="category_view" />
14+
</record>
15+
16+
<record model="product.category" id="category_normal_2">
17+
<field name="name">Demo Category 2 (Type Normal)</field>
18+
<field name="type">normal</field>
19+
<field name="parent_id" ref="category_view" />
20+
</record>
21+
</odoo>

product_category_type/i18n/de.po

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * product_category_type
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 14.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"PO-Revision-Date: 2022-05-11 13:05+0000\n"
10+
"Last-Translator: Maria Sparenberg <maria.sparenberg@gmx.net>\n"
11+
"Language-Team: none\n"
12+
"Language: de\n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: \n"
16+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
17+
"X-Generator: Weblate 4.3.2\n"
18+
19+
#. module: product_category_type
20+
#: model:ir.model.fields,help:product_category_type.field_product_category__type
21+
msgid ""
22+
"A category of the view type is a virtual category that can be used as the "
23+
"parent of another category to create a hierarchical structure."
24+
msgstr ""
25+
"Eine Kategorie mit Typ \"Ansicht\" ist eine virtuelle Kategorie, die als "
26+
"übergeordnete Kategorie verwendet werden kann, um eine Hierarchie zu "
27+
"erstellen."
28+
29+
#. module: product_category_type
30+
#: model:ir.model.fields,field_description:product_category_type.field_product_category__type
31+
msgid "Category Type"
32+
msgstr "Kategorie-Typ"
33+
34+
#. module: product_category_type
35+
#: model:ir.model.fields.selection,name:product_category_type.selection__product_category__type__normal
36+
msgid "Normal"
37+
msgstr "Normal"
38+
39+
#. module: product_category_type
40+
#: model:ir.model.fields,field_description:product_category_type.field_product_category__parent_id
41+
msgid "Parent Category"
42+
msgstr "Übergeordnete Kategorie"
43+
44+
#. module: product_category_type
45+
#: model:ir.model,name:product_category_type.model_product_template
46+
msgid "Product"
47+
msgstr ""
48+
49+
#. module: product_category_type
50+
#: model:ir.model,name:product_category_type.model_product_category
51+
#: model:ir.model.fields,field_description:product_category_type.field_product_product__categ_id
52+
#: model:ir.model.fields,field_description:product_category_type.field_product_template__categ_id
53+
msgid "Product Category"
54+
msgstr "Produktkategorie"
55+
56+
#. module: product_category_type
57+
#: model:ir.model.fields.selection,name:product_category_type.selection__product_category__type__view
58+
msgid "View"
59+
msgstr "Ansicht"
60+
61+
#~ msgid "Display Name"
62+
#~ msgstr "Anzeigename"
63+
64+
#~ msgid "ID"
65+
#~ msgstr "ID"
66+
67+
#~ msgid "Last Modified on"
68+
#~ msgstr "Zuletzt geändert am"
69+
70+
#~ msgid "Product Template"
71+
#~ msgstr "Produktvorlage"
72+
73+
#~ msgid "Select category for the current product"
74+
#~ msgstr "Kategorie für das aktuelle Produkt auswählen"

product_category_type/i18n/es.po

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * product_category_type
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 16.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"PO-Revision-Date: 2023-08-29 08:31+0000\n"
10+
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\n"
11+
"Language-Team: none\n"
12+
"Language: es\n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: \n"
16+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
17+
"X-Generator: Weblate 4.17\n"
18+
19+
#. module: product_category_type
20+
#: model:ir.model.fields,help:product_category_type.field_product_category__type
21+
msgid ""
22+
"A category of the view type is a virtual category that can be used as the "
23+
"parent of another category to create a hierarchical structure."
24+
msgstr ""
25+
"Una categoría del tipo vista es una categoría virtual que puede utilizarse "
26+
"como padre de otra categoría para crear una estructura jerárquica."
27+
28+
#. module: product_category_type
29+
#: model:ir.model.fields,field_description:product_category_type.field_product_category__type
30+
msgid "Category Type"
31+
msgstr "Tipo de Categoría"
32+
33+
#. module: product_category_type
34+
#: model:ir.model.fields.selection,name:product_category_type.selection__product_category__type__normal
35+
msgid "Normal"
36+
msgstr "Normal"
37+
38+
#. module: product_category_type
39+
#: model:ir.model.fields,field_description:product_category_type.field_product_category__parent_id
40+
msgid "Parent Category"
41+
msgstr "Categoría Parental"
42+
43+
#. module: product_category_type
44+
#: model:ir.model,name:product_category_type.model_product_template
45+
msgid "Product"
46+
msgstr "Producto"
47+
48+
#. module: product_category_type
49+
#: model:ir.model,name:product_category_type.model_product_category
50+
#: model:ir.model.fields,field_description:product_category_type.field_product_product__categ_id
51+
#: model:ir.model.fields,field_description:product_category_type.field_product_template__categ_id
52+
msgid "Product Category"
53+
msgstr "Categoría de Producto"
54+
55+
#. module: product_category_type
56+
#: model:ir.model.fields.selection,name:product_category_type.selection__product_category__type__view
57+
msgid "View"
58+
msgstr "Ver"

product_category_type/i18n/fr.po

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * product_category_type
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 16.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"POT-Creation-Date: 2023-02-24 16:47+0000\n"
10+
"PO-Revision-Date: 2023-02-24 16:47+0000\n"
11+
"Last-Translator: \n"
12+
"Language-Team: \n"
13+
"Language: \n"
14+
"MIME-Version: 1.0\n"
15+
"Content-Type: text/plain; charset=UTF-8\n"
16+
"Content-Transfer-Encoding: \n"
17+
"Plural-Forms: \n"
18+
19+
#. module: product_category_type
20+
#: model:ir.model.fields,help:product_category_type.field_product_category__type
21+
msgid ""
22+
"A category of the view type is a virtual category that can be used as the "
23+
"parent of another category to create a hierarchical structure."
24+
msgstr ""
25+
"Une catégorie de type vue est une catégorie virtuelle qui est utilisée "
26+
"comme parent d'une autre catégorie, pour créer une structure hiérarchique."
27+
28+
#. module: product_category_type
29+
#: model:ir.model.fields,field_description:product_category_type.field_product_category__type
30+
msgid "Category Type"
31+
msgstr "Type de catégorie"
32+
33+
#. module: product_category_type
34+
#: model:ir.model.fields.selection,name:product_category_type.selection__product_category__type__normal
35+
msgid "Normal"
36+
msgstr ""
37+
38+
#. module: product_category_type
39+
#: model:ir.model.fields,field_description:product_category_type.field_product_category__parent_id
40+
msgid "Parent Category"
41+
msgstr "Catégorie mère"
42+
43+
#. module: product_category_type
44+
#: model:ir.model,name:product_category_type.model_product_template
45+
msgid "Product"
46+
msgstr "Produit"
47+
48+
#. module: product_category_type
49+
#: model:ir.model,name:product_category_type.model_product_category
50+
#: model:ir.model.fields,field_description:product_category_type.field_product_product__categ_id
51+
#: model:ir.model.fields,field_description:product_category_type.field_product_template__categ_id
52+
msgid "Product Category"
53+
msgstr "Catégorie de produit"
54+
55+
#. module: product_category_type
56+
#: model:ir.model.fields.selection,name:product_category_type.selection__product_category__type__view
57+
msgid "View"
58+
msgstr "Vue"

0 commit comments

Comments
 (0)