Skip to content

Commit

Permalink
Merge PR #171 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by sbejaoui
  • Loading branch information
OCA-git-bot committed Oct 16, 2023
2 parents a7fbe2a + c204035 commit d867a32
Show file tree
Hide file tree
Showing 16 changed files with 690 additions and 0 deletions.
85 changes: 85 additions & 0 deletions product_brand_purchase/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
======================
Product Brand Purchase
======================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:766c6f719e06d0736dea7d6f9273e76d402859700a4deb9f7563b35609ab0602
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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/licence-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/16.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-14-0/brand-14-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=16.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
=====

#. "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:%2016.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 <[email protected]>

* `Ooops404 <https://www.ooops404.com>`__:

* Ilyas <[email protected]>

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/16.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": "16.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"],
}
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 <[email protected]>\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"
45 changes: 45 additions & 0 deletions product_brand_purchase/i18n/product_brand_purchase.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# 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"
"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.model.fields,field_description:product_brand_purchase.field_purchase_report__display_name
msgid "Display Name"
msgstr ""

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

#. module: product_brand_purchase
#: model:ir.model.fields,field_description:product_brand_purchase.field_purchase_report____last_update
msgid "Last Modified on"
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 ""
5 changes: 5 additions & 0 deletions product_brand_purchase/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
* Quentin Groulard <[email protected]>

* `Ooops404 <https://www.ooops404.com>`__:

* Ilyas <[email protected]>
1 change: 1 addition & 0 deletions product_brand_purchase/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module allows to work with product_brand in purchase reports.
1 change: 1 addition & 0 deletions product_brand_purchase/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +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


class PurchaseReport(models.Model):

_inherit = "purchase.report"

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

def _select(self):
select_str = super(PurchaseReport, self)._select()
return select_str + ", t.product_brand_id as product_brand_id"

def _group_by(self):
group_by_str = super(PurchaseReport, self)._group_by()
return group_by_str + ", t.product_brand_id"
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

0 comments on commit d867a32

Please sign in to comment.