Browse Source

[ADD] product_variant_sequence module

16.0
RemiFr82 1 year ago
parent
commit
e38f9e2d20
  1. 3
      product_variant_description_sale/__manifest__.py
  2. 1
      product_variant_sequence/__init__.py
  3. 39
      product_variant_sequence/__manifest__.py
  4. 31
      product_variant_sequence/i18n/fr.po
  5. 1
      product_variant_sequence/models/__init__.py
  6. 11
      product_variant_sequence/models/product_product.py
  7. 15
      product_variant_sequence/views/product_product.xml

3
product_variant_description_sale/__manifest__.py

@ -3,7 +3,8 @@
"name": "Product Variant description",
"version": "1.0.0",
"summary": """
This module allows to manage additional internal, sales and purchases descriptions on product variants
This module allows to manage additional sales description on product variants.
It appears as new line multi-line mention in sale orders and invoices lines description.
""",
"description": """
TO WRITE

1
product_variant_sequence/__init__.py

@ -0,0 +1 @@
from . import models

39
product_variant_sequence/__manifest__.py

@ -0,0 +1,39 @@
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
{
"name": "Product Variant sequence",
"version": "1.0.0",
"summary": """
This module adds a sequence for ordering product variants in tree view.
""",
"description": """
TO WRITE
""",
"author": "RemiFr82",
"contributors": "",
"website": "https://remifr82.me",
"license": "LGPL-3",
"category": "Events",
# "price": 0,
# "currency": "EUR",
"application": False,
"installable": True,
"auto_install": False,
"pre_init_hook": "",
"post_init_hook": "",
"uninstall_hook": "",
"excludes": [],
"external_dependencies": [],
"depends": [
"product",
],
"data": [
"views/product_product.xml",
],
"assets": {},
"css": [],
"images": [],
"js": [],
"test": [],
"demo": [],
"maintainer": "RemiFr82",
}

31
product_variant_sequence/i18n/fr.po

@ -0,0 +1,31 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_variant_sequence
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0+e-20230613\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-10-04 18:31+0000\n"
"PO-Revision-Date: 2023-10-04 18:31+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: product_variant_sequence
#: model:ir.model,name:product_variant_sequence.model_product_product
msgid "Product Variant"
msgstr "Variante de produit"
#. module: product_variant_sequence
#: model_terms:ir.ui.view,arch_db:product_variant_sequence.product_product_tree_view_inherit
msgid "Variant sequence"
msgstr "Séquence de variante"
#. module: product_variant_sequence
#: model:ir.model.fields,field_description:product_variant_sequence.field_product_product__variant_sequence
msgid "Variant sequence"
msgstr "Séquence de variante"

1
product_variant_sequence/models/__init__.py

@ -0,0 +1 @@
from . import product_product

11
product_variant_sequence/models/product_product.py

@ -0,0 +1,11 @@
from odoo import models, fields
class ProductProduct(models.Model):
_inherit = "product.product"
_order = "sequence, priority desc, default_code, name, id"
variant_sequence = fields.Integer(
"Variant sequence",
default=1,
)

15
product_variant_sequence/views/product_product.xml

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="product_product_tree_view_inherit" model="ir.ui.view">
<field name="name">product.product.view.list.inherit</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_product_tree_view" />
<field name="arch" type="xml">
<field name="priority" position="before">
<field name="variant_sequence" widget="handle" />
</field>
</field>
</record>
</odoo>
Loading…
Cancel
Save