Skip to content

Commit

Permalink
[MIG] product_brand: Migration to 18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Samir GUESMI committed Oct 10, 2024
1 parent 9e1d208 commit 27fc8f9
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 45 deletions.
54 changes: 27 additions & 27 deletions product_brand/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ Product Brand Manager
: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/17.0/product_brand
:target: https://github.com/OCA/brand/tree/18.0/product_brand
:alt: OCA/brand
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/brand-17-0/brand-17-0-product_brand
:target: https://translation.odoo-community.org/projects/brand-18-0/brand-18-0-product_brand
: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=17.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/brand&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand Down Expand Up @@ -66,17 +66,17 @@ To see the invoice report based on brand dimension:
Known issues / Roadmap
======================

- Add a field with brands associated to a Customer or Supplier on the
Customers/Suppliers Form View.
- Fix smart button alignment in brand form view
- Add a field with brands associated to a Customer or Supplier on the
Customers/Suppliers Form View.
- Fix smart button alignment in brand form view

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%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/brand/issues/new?body=module:%20product_brand%0Aversion:%2018.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.

Expand All @@ -97,32 +97,32 @@ Authors
Contributors
------------

- Mathieu Lemercier <[email protected]>
- Franck Bret <[email protected]>
- Seraphine Lantible <[email protected]>
- Gunnar Wagner <[email protected]>
- Leonardo Donelli <[email protected]>
- Serpent Consulting Services Pvt. Ltd. <[email protected]>
- Marcelo Pickler <[email protected]>
- Andrius Laukavičius <[email protected]> (Boolit)
- Daniel Campos <[email protected]>
- `Tecnativa <https://www.tecnativa.com>`__
- Mathieu Lemercier <[email protected]>
- Franck Bret <[email protected]>
- Seraphine Lantible <[email protected]>
- Gunnar Wagner <[email protected]>
- Leonardo Donelli <[email protected]>
- Serpent Consulting Services Pvt. Ltd. <[email protected]>
- Marcelo Pickler <[email protected]>
- Andrius Laukavičius <[email protected]> (Boolit)
- Daniel Campos <[email protected]>
- `Tecnativa <https://www.tecnativa.com>`__

- David Vidal
- João Marques
- David Vidal
- João Marques

- Kaushal Prajapati <[email protected]>
- `Jarsa <https://www.jarsa.com>`__
- Kaushal Prajapati <[email protected]>
- `Jarsa <https://www.jarsa.com>`__

- Alan Ramos
- Alan Ramos

- `NuoBiT Solutions <https://www.nuobit.com>`__
- `NuoBiT Solutions <https://www.nuobit.com>`__

- Eric Antones <[email protected]>
- Eric Antones <[email protected]>

- `Trobz <https://trobz.com>`__:
- `Trobz <https://trobz.com>`__:

- Thao Le <[email protected]>
- Thao Le <[email protected]>

Other credits
-------------
Expand All @@ -143,6 +143,6 @@ 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/17.0/product_brand>`_ project on GitHub.
This module is part of the `OCA/brand <https://github.com/OCA/brand/tree/18.0/product_brand>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 1 addition & 1 deletion product_brand/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

{
"name": "Product Brand Manager",
"version": "17.0.1.1.1",
"version": "18.0.1.1.1",
"development_status": "Mature",
"category": "Product",
"summary": "Product Brand Manager",
Expand Down
9 changes: 5 additions & 4 deletions product_brand/reports/account_invoice_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)

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


class AccountInvoiceReport(models.Model):
Expand All @@ -11,14 +12,14 @@ class AccountInvoiceReport(models.Model):

@api.model
def _select(self):
select_str = super()._select()
select_str = super()._select().code
select_str += """

Check warning on line 16 in product_brand/reports/account_invoice_report.py

View check run for this annotation

Codecov / codecov/patch

product_brand/reports/account_invoice_report.py#L15-L16

Added lines #L15 - L16 were not covered by tests
, template.product_brand_id as product_brand_id
"""
return select_str
return SQL(select_str)

Check warning on line 19 in product_brand/reports/account_invoice_report.py

View check run for this annotation

Codecov / codecov/patch

product_brand/reports/account_invoice_report.py#L19

Added line #L19 was not covered by tests

@api.model
def _group_by(self):
group_by_str = super()._group_by()
group_by_str = super()._group_by().code
group_by_str += ", template.product_brand_id"
return group_by_str
return SQL(group_by_str)

Check warning on line 25 in product_brand/reports/account_invoice_report.py

View check run for this annotation

Codecov / codecov/patch

product_brand/reports/account_invoice_report.py#L23-L25

Added lines #L23 - L25 were not covered by tests
6 changes: 3 additions & 3 deletions product_brand/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ <h1 class="title">Product Brand Manager</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:a7a9c5429fcfddf3b8fb5b4a07cb7eb47f5ec2d96769b0f4e71129041ea91ea5
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Mature" src="https://img.shields.io/badge/maturity-Mature-brightgreen.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/brand/tree/17.0/product_brand"><img alt="OCA/brand" src="https://img.shields.io/badge/github-OCA%2Fbrand-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/brand-17-0/brand-17-0-product_brand"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/brand&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Mature" src="https://img.shields.io/badge/maturity-Mature-brightgreen.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/brand/tree/18.0/product_brand"><img alt="OCA/brand" src="https://img.shields.io/badge/github-OCA%2Fbrand-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/brand-18-0/brand-18-0-product_brand"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/brand&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module allows odoo users to easily manage product brands.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
Expand Down Expand Up @@ -426,7 +426,7 @@ <h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/brand/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/brand/issues/new?body=module:%20product_brand%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/brand/issues/new?body=module:%20product_brand%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand Down Expand Up @@ -489,7 +489,7 @@ <h2><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h2>
<p>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.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/brand/tree/17.0/product_brand">OCA/brand</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/brand/tree/18.0/product_brand">OCA/brand</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down
17 changes: 7 additions & 10 deletions product_brand/views/product_brand_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
<record id="action_open_brand_products" model="ir.actions.act_window">
<field name="name">Brand Products</field>
<field name="res_model">product.template</field>
<field name="view_mode">kanban,form,tree</field>
<field name="view_mode">kanban,form,list</field>
<field name="domain">[('product_brand_id', '=', active_id)]</field>
</record>
<record id="action_open_single_product_brand" model="ir.actions.act_window">
<field name="name">Product Brand</field>
<field name="res_model">product.brand</field>
<field name="view_mode">kanban,form,tree</field>
<field name="view_mode">kanban,form,list</field>
<field name="target">current</field>
<field name="domain">[('product_ids', 'in', active_id)]</field>
</record>
Expand Down Expand Up @@ -69,11 +69,11 @@
<field name="name">product.brand.tree</field>
<field name="model">product.brand</field>
<field name="arch" type="xml">
<tree>
<list>
<field name="name" />
<field name="description" />
<field name="partner_id" />
</tree>
</list>
</field>
</record>
<record id="view_product_brand_kanban" model="ir.ui.view">
Expand Down Expand Up @@ -147,7 +147,7 @@
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_kanban_view" />
<field name="arch" type="xml">
<xpath expr="//strong[hasclass('o_kanban_record_title')]" position="after">
<xpath expr="//div[hasclass('d-flex')]" position="after">
<div>
<a
t-if="record.product_brand_id"
Expand All @@ -165,10 +165,7 @@
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_kanban_view" />
<field name="arch" type="xml">
<xpath
expr="//div[hasclass('oe_kanban_details')]//strong[1]"
position="after"
>
<xpath expr="//div[hasclass('d-flex')]" position="after">
<div>
<a t-if="record.product_brand_id" type="open">
<field name="product_brand_id" />
Expand Down Expand Up @@ -200,7 +197,7 @@
<record model="ir.actions.act_window" id="action_product_brand">
<field name="name">Brand</field>
<field name="res_model">product.brand</field>
<field name="view_mode">kanban,form,tree</field>
<field name="view_mode">kanban,form,list</field>
</record>
<menuitem
name="Product Brands"
Expand Down

0 comments on commit 27fc8f9

Please sign in to comment.