Skip to content

Commit

Permalink
[ADD] product_brand_supplierinfo: In "Supplier Pricelist" new fields …
Browse files Browse the repository at this point in the history
…"Brand", and "Brand Code".
  • Loading branch information
alfredoavanzosc committed May 27, 2024
1 parent 8225af6 commit d625e47
Show file tree
Hide file tree
Showing 10 changed files with 201 additions and 0 deletions.
30 changes: 30 additions & 0 deletions product_brand_supplierinfo/README.rst
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>
1 change: 1 addition & 0 deletions product_brand_supplierinfo/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
21 changes: 21 additions & 0 deletions product_brand_supplierinfo/__manifest__.py
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,
}
37 changes: 37 additions & 0 deletions product_brand_supplierinfo/i18n/es.po
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 product_brand_supplierinfo/i18n/product_brand_supplierinfo.pot
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 ""
2 changes: 2 additions & 0 deletions product_brand_supplierinfo/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import product_brand
from . import product_supplierinfo
12 changes: 12 additions & 0 deletions product_brand_supplierinfo/models/product_brand.py
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
)
16 changes: 16 additions & 0 deletions product_brand_supplierinfo/models/product_supplierinfo.py
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
)
32 changes: 32 additions & 0 deletions product_brand_supplierinfo/views/product_brand_views.xml
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 product_brand_supplierinfo/views/product_supplierinfo_views.xml
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>

0 comments on commit d625e47

Please sign in to comment.