Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 93 additions & 0 deletions product_brand_purchase/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

======================
Product Brand Purchase
======================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:57117ce32a3091dfe822a7e7999f104ca7d2811da178fecf3ab6d92d6a76946a
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fbrand-lightgray.png?logo=github
:target: https://github.com/OCA/brand/tree/19.0/product_brand_purchase
:alt: OCA/brand
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/brand-19-0/brand-19-0-product_brand_purchase
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/brand&target_branch=19.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module allows to work with product_brand in purchase reports.

**Table of contents**

.. contents::
:local:

Usage
=====

1. "Product Brands" menu is now accessible also under Purchase >
Configuration > Products

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/brand/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/brand/issues/new?body=module:%20product_brand_purchase%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* ACSONE SA/NV

Contributors
------------

- Quentin Groulard <quentin.groulard@acsone.eu>
- `Ooops404 <https://www.ooops404.com>`__:

- Ilyas <irazor147@gmail.com>

- `Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>`__

- Bhavesh Heliconia

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/brand <https://github.com/OCA/brand/tree/19.0/product_brand_purchase>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions product_brand_purchase/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import reports
14 changes: 14 additions & 0 deletions product_brand_purchase/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2020 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Product Brand Purchase",
"summary": """
This module allows to work with product_brand in purchase reports.""",
"version": "19.0.1.0.0",
"license": "AGPL-3",
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/brand",
"depends": ["product_brand", "purchase"],
"data": ["reports/purchase_report_view.xml", "views/product_brand_view.xml"],
}
33 changes: 33 additions & 0 deletions product_brand_purchase/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_brand_purchase
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-10-28 13:24+0000\n"
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: product_brand_purchase
#: model:ir.model.fields,field_description:product_brand_purchase.field_purchase_report__product_brand_id
#: model_terms:ir.ui.view,arch_db:product_brand_purchase.purchase_report_search_view
msgid "Brand"
msgstr "Marca"

#. module: product_brand_purchase
#: model:ir.ui.menu,name:product_brand_purchase.menu_product_in_config_purchase_product_brand
msgid "Product Brands"
msgstr "Marcas de Producto"

#. module: product_brand_purchase
#: model:ir.model,name:product_brand_purchase.model_purchase_report
msgid "Purchase Report"
msgstr "Informe de Compra"
48 changes: 48 additions & 0 deletions product_brand_purchase/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_brand_purchase
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-02-17 12:22+0000\n"
"Last-Translator: Francesco Foresti <francesco.foresti@ooops404.com>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.14.1\n"

#. module: product_brand_purchase
#: model:ir.model.fields,field_description:product_brand_purchase.field_purchase_report__product_brand_id
#: model_terms:ir.ui.view,arch_db:product_brand_purchase.purchase_report_search_view
msgid "Brand"
msgstr "Marca"

#. module: product_brand_purchase
#: model:ir.model.fields,field_description:product_brand_purchase.field_purchase_report__display_name
msgid "Display Name"
msgstr "Nome visualizzato"

#. module: product_brand_purchase
#: model:ir.model.fields,field_description:product_brand_purchase.field_purchase_report__id
msgid "ID"
msgstr "ID"

#. module: product_brand_purchase
#: model:ir.model.fields,field_description:product_brand_purchase.field_purchase_report____last_update
msgid "Last Modified on"
msgstr "Ultima modifica il"

#. module: product_brand_purchase
#: model:ir.ui.menu,name:product_brand_purchase.menu_product_in_config_purchase_product_brand
msgid "Product Brands"
msgstr "Marche del prodotto"

#. module: product_brand_purchase
#: model:ir.model,name:product_brand_purchase.model_purchase_report
msgid "Purchase Report"
msgstr "Resoconto di acquisto"
33 changes: 33 additions & 0 deletions product_brand_purchase/i18n/nl.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_brand_purchase
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2025-08-09 13:22+0000\n"
"Last-Translator: Bosd <c5e2fd43-d292-4c90-9d1f-74ff3436329a@anonaddy.me>\n"
"Language-Team: none\n"
"Language: nl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.10.4\n"

#. module: product_brand_purchase
#: model:ir.model.fields,field_description:product_brand_purchase.field_purchase_report__product_brand_id
#: model_terms:ir.ui.view,arch_db:product_brand_purchase.purchase_report_search_view
msgid "Brand"
msgstr "Merk"

#. module: product_brand_purchase
#: model:ir.ui.menu,name:product_brand_purchase.menu_product_in_config_purchase_product_brand
msgid "Product Brands"
msgstr "Productmerken"

#. module: product_brand_purchase
#: model:ir.model,name:product_brand_purchase.model_purchase_report
msgid "Purchase Report"
msgstr "Aankooprapport"
30 changes: 30 additions & 0 deletions product_brand_purchase/i18n/product_brand_purchase.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_brand_purchase
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \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_purchase
#: model:ir.model.fields,field_description:product_brand_purchase.field_purchase_report__product_brand_id
#: model_terms:ir.ui.view,arch_db:product_brand_purchase.purchase_report_search_view
msgid "Brand"
msgstr ""

#. module: product_brand_purchase
#: model:ir.ui.menu,name:product_brand_purchase.menu_product_in_config_purchase_product_brand
msgid "Product Brands"
msgstr ""

#. module: product_brand_purchase
#: model:ir.model,name:product_brand_purchase.model_purchase_report
msgid "Purchase Report"
msgstr ""
3 changes: 3 additions & 0 deletions product_brand_purchase/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
5 changes: 5 additions & 0 deletions product_brand_purchase/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- Quentin Groulard \<<quentin.groulard@acsone.eu>\>
- [Ooops404](https://www.ooops404.com):
- Ilyas \<<irazor147@gmail.com>\>
- [Heliconia Solutions Pvt. Ltd.](https://www.heliconia.io)
- Bhavesh Heliconia
1 change: 1 addition & 0 deletions product_brand_purchase/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module allows to work with product_brand in purchase reports.
2 changes: 2 additions & 0 deletions product_brand_purchase/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1. "Product Brands" menu is now accessible also under Purchase \>
Configuration \> Products
1 change: 1 addition & 0 deletions product_brand_purchase/reports/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import purchase_report
19 changes: 19 additions & 0 deletions product_brand_purchase/reports/purchase_report.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2020 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models
from odoo.tools import SQL


class PurchaseReport(models.Model):
_inherit = "purchase.report"

product_brand_id = fields.Many2one(comodel_name="product.brand", string="Brand")

def _select(self):
select_str = super()._select()
return SQL("%s, t.product_brand_id as product_brand_id", select_str)

def _group_by(self):
group_by_str = super()._group_by()
return SQL("%s, t.product_brand_id", group_by_str)
19 changes: 19 additions & 0 deletions product_brand_purchase/reports/purchase_report_view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2020 ACSONE SA/NV
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
<record model="ir.ui.view" id="purchase_report_search_view">
<field name="name">purchase.report.search (in product_brand_purchase)</field>
<field name="model">purchase.report</field>
<field name="inherit_id" ref="purchase.view_purchase_order_search" />
<field name="arch" type="xml">
<filter name="group_partner_id" position="after">
<filter
name="brand"
string="Brand"
context="{'group_by': 'product_brand_id'}"
/>
</filter>
</field>
</record>
</odoo>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading