-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADD] product_brand_supplierinfo: In "Supplier Pricelist" new fields …
…"Brand", and "Brand Code".
- Loading branch information
1 parent
8225af6
commit d625e47
Showing
10 changed files
with
201 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
|
||
========================== | ||
Product brand supplierinfo | ||
========================== | ||
|
||
* In "Product Brand" new field "Code". | ||
* In "Supplier Pricelist" new fields "Brand", and "Brand Code". | ||
|
||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues | ||
<https://github.com/avanzosc/odoo-addons/issues>`_. In case of trouble, | ||
please check there if your issue has already been reported. If you spotted | ||
it first, help us smash it by providing detailed and welcomed feedback. | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
Credits | ||
======= | ||
|
||
Contributors | ||
------------ | ||
|
||
* Ana Juaristi <anajuaristi@avanzosc.es> | ||
* Alfredo de la Fuente <alfredodelafuente@avanzosc.es> |
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 @@ | ||
from . import models |
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,21 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2024 Alfredo de la Fuente - AvanzOSC | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
|
||
{ | ||
"name": "Product Brand Supplierinfo", | ||
"version": "16.0.1.0.0", | ||
"category": "Product", | ||
"website": "http://www.avanzosc.com", | ||
"author": "Avanzosc", | ||
"license": "AGPL-3", | ||
"depends": [ | ||
"product", | ||
"product_brand" | ||
], | ||
"data": [ | ||
"views/product_brand_views.xml", | ||
"views/product_supplierinfo_views.xml", | ||
], | ||
"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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * product_brand_supplierinfo | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 16.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2024-05-27 10:43+0000\n" | ||
"PO-Revision-Date: 2024-05-27 10:43+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_brand_supplierinfo | ||
#: model:ir.model.fields,field_description:product_brand_supplierinfo.field_product_supplierinfo__product_brand_id | ||
msgid "Brand" | ||
msgstr "Marca" | ||
|
||
#. module: product_brand_supplierinfo | ||
#: model:ir.model.fields,field_description:product_brand_supplierinfo.field_product_brand__code | ||
#: model:ir.model.fields,field_description:product_brand_supplierinfo.field_product_supplierinfo__brand_code | ||
msgid "Brand Code" | ||
msgstr "Código marca" | ||
|
||
#. module: product_brand_supplierinfo | ||
#: model:ir.model,name:product_brand_supplierinfo.model_product_brand | ||
msgid "Product Brand" | ||
msgstr "Marca de producto" | ||
|
||
#. module: product_brand_supplierinfo | ||
#: model:ir.model,name:product_brand_supplierinfo.model_product_supplierinfo | ||
msgid "Supplier Pricelist" | ||
msgstr "Tarifa de proveedor" |
37 changes: 37 additions & 0 deletions
37
product_brand_supplierinfo/i18n/product_brand_supplierinfo.pot
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,37 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * product_brand_supplierinfo | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 16.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2024-05-27 10:43+0000\n" | ||
"PO-Revision-Date: 2024-05-27 10:43+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_brand_supplierinfo | ||
#: model:ir.model.fields,field_description:product_brand_supplierinfo.field_product_supplierinfo__product_brand_id | ||
msgid "Brand" | ||
msgstr "" | ||
|
||
#. module: product_brand_supplierinfo | ||
#: model:ir.model.fields,field_description:product_brand_supplierinfo.field_product_brand__code | ||
#: model:ir.model.fields,field_description:product_brand_supplierinfo.field_product_supplierinfo__brand_code | ||
msgid "Brand Code" | ||
msgstr "" | ||
|
||
#. module: product_brand_supplierinfo | ||
#: model:ir.model,name:product_brand_supplierinfo.model_product_brand | ||
msgid "Product Brand" | ||
msgstr "" | ||
|
||
#. module: product_brand_supplierinfo | ||
#: model:ir.model,name:product_brand_supplierinfo.model_product_supplierinfo | ||
msgid "Supplier Pricelist" | ||
msgstr "" |
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,2 @@ | ||
from . import product_brand | ||
from . import product_supplierinfo |
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,12 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2024 Alfredo de la Fuente - AvanzOSC | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
from odoo import fields, models | ||
|
||
|
||
class ProductBrand(models.Model): | ||
_inherit = "product.brand" | ||
|
||
code = fields.Char( | ||
string="Brand Code", copy=False | ||
) |
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,16 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2024 Alfredo de la Fuente - AvanzOSC | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
from odoo import fields, models | ||
|
||
|
||
class ProductSupplierinfo(models.Model): | ||
_inherit = "product.supplierinfo" | ||
|
||
product_brand_id = fields.Many2one( | ||
string="Brand", comodel_name="product.brand", copy=False | ||
) | ||
brand_code = fields.Char( | ||
string="Brand Code", related="product_brand_id.code", | ||
store=True, copy=False | ||
) |
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,32 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<odoo> | ||
<record id="view_product_brand_tree" model="ir.ui.view"> | ||
<field name="model">product.brand</field> | ||
<field name="inherit_id" ref="product_brand.view_product_brand_tree"/> | ||
<field name="arch" type="xml"> | ||
<field name="partner_id" position="after"> | ||
<field name="code" optional="show" /> | ||
</field> | ||
</field> | ||
</record> | ||
|
||
<record id="view_product_brand_form" model="ir.ui.view"> | ||
<field name="model">product.brand</field> | ||
<field name="inherit_id" ref="product_brand.view_product_brand_form"/> | ||
<field name="arch" type="xml"> | ||
<field name="partner_id" position="after"> | ||
<field name="code" /> | ||
</field> | ||
</field> | ||
</record> | ||
|
||
<record id="product_brand_search_form_view" model="ir.ui.view"> | ||
<field name="model">product.brand</field> | ||
<field name="inherit_id" ref="product_brand.product_brand_search_form_view"/> | ||
<field name="arch" type="xml"> | ||
<field name="partner_id" position="after"> | ||
<field name="code" /> | ||
</field> | ||
</field> | ||
</record> | ||
</odoo> |
13 changes: 13 additions & 0 deletions
13
product_brand_supplierinfo/views/product_supplierinfo_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<odoo> | ||
<record id="product_supplierinfo_tree_view" model="ir.ui.view"> | ||
<field name="model">product.supplierinfo</field> | ||
<field name="inherit_id" ref="product.product_supplierinfo_tree_view"/> | ||
<field name="arch" type="xml"> | ||
<field name="product_code" position="after"> | ||
<field name="product_brand_id" optional="show" /> | ||
<field name="brand_code" optional="show" readonly="1"/> | ||
</field> | ||
</field> | ||
</record> | ||
</odoo> |