Skip to content

Commit 5270f52

Browse files
committed
[MIG] brand: Migration to 18.0
1 parent 933c31e commit 5270f52

File tree

5 files changed

+27
-24
lines changed

5 files changed

+27
-24
lines changed

brand/README.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ Brand
1717
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1818
:alt: License: AGPL-3
1919
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fbrand-lightgray.png?logo=github
20-
:target: https://github.com/OCA/brand/tree/17.0/brand
20+
:target: https://github.com/OCA/brand/tree/18.0/brand
2121
:alt: OCA/brand
2222
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/brand-17-0/brand-17-0-brand
23+
:target: https://translation.odoo-community.org/projects/brand-18-0/brand-18-0-brand
2424
:alt: Translate me on Weblate
2525
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26-
:target: https://runboat.odoo-community.org/builds?repo=OCA/brand&target_branch=17.0
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/brand&target_branch=18.0
2727
:alt: Try me on Runboat
2828

2929
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -74,7 +74,7 @@ Bug Tracker
7474
Bugs are tracked on `GitHub Issues <https://github.com/OCA/brand/issues>`_.
7575
In case of trouble, please check there if your issue has already been reported.
7676
If you spotted it first, help us to smash it by providing a detailed and welcomed
77-
`feedback <https://github.com/OCA/brand/issues/new?body=module:%20brand%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
77+
`feedback <https://github.com/OCA/brand/issues/new?body=module:%20brand%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
7878

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

@@ -122,6 +122,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
122122

123123
|maintainer-sbejaoui|
124124

125-
This module is part of the `OCA/brand <https://github.com/OCA/brand/tree/17.0/brand>`_ project on GitHub.
125+
This module is part of the `OCA/brand <https://github.com/OCA/brand/tree/18.0/brand>`_ project on GitHub.
126126

127127
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

brand/__manifest__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
This is a base addon for brand modules. It adds the brand object and
88
its menu and define an abstract model to be inherited from branded
99
objects""",
10-
"version": "17.0.1.1.1",
10+
"version": "18.0.1.0.0",
1111
"license": "AGPL-3",
1212
"author": "Odoo Community Association (OCA), ACSONE SA/NV",
1313
"website": "https://github.com/OCA/brand",

brand/models/res_brand_mixin.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def _get_view(self, view_id=None, view_type="form", **options):
5454
"""set visibility and requirement rules"""
5555
arch, view = super()._get_view(view_id, view_type, **options)
5656
if self.env["res.brand"].check_access_rights("read", raise_exception=False):
57-
if view.type in ["form", "tree"]:
57+
if view.type in ["form", "list"]:
5858
brand_node = next(
5959
iter(
6060
arch.xpath(

brand/static/description/index.html

+10-7
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88

99
/*
1010
:Author: David Goodger ([email protected])
11-
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
11+
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
1212
:Copyright: This stylesheet has been placed in the public domain.
1313
1414
Default cascading style sheet for the HTML output of Docutils.
15+
Despite the name, some widely supported CSS2 features are used.
1516
1617
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
1718
customize this style sheet.
@@ -274,7 +275,7 @@
274275
margin-left: 2em ;
275276
margin-right: 2em }
276277

277-
pre.code .ln { color: grey; } /* line numbers */
278+
pre.code .ln { color: gray; } /* line numbers */
278279
pre.code, code { background-color: #eeeeee }
279280
pre.code .comment, code .comment { color: #5C6576 }
280281
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
@@ -300,7 +301,7 @@
300301
span.pre {
301302
white-space: pre }
302303

303-
span.problematic {
304+
span.problematic, pre.problematic {
304305
color: red }
305306

306307
span.section-subtitle {
@@ -368,7 +369,7 @@ <h1 class="title">Brand</h1>
368369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
369370
!! source digest: sha256:dfca48afbbc980c86b0e1659f2fac237d7f98779ff9d9ad686ead39dc20dfadc
370371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
371-
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.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/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-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>
372+
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.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/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-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>
372373
<p>This is a base addon for brand modules. It adds the brand object and its
373374
menu and define an abstract model to be inherited from branded objects.</p>
374375
<p><strong>Table of contents</strong></p>
@@ -421,7 +422,7 @@ <h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
421422
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/brand/issues">GitHub Issues</a>.
422423
In case of trouble, please check there if your issue has already been reported.
423424
If you spotted it first, help us to smash it by providing a detailed and welcomed
424-
<a class="reference external" href="https://github.com/OCA/brand/issues/new?body=module:%20brand%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
425+
<a class="reference external" href="https://github.com/OCA/brand/issues/new?body=module:%20brand%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
425426
<p>Do not contact contributors directly about support or help with technical issues.</p>
426427
</div>
427428
<div class="section" id="credits">
@@ -452,13 +453,15 @@ <h2><a class="toc-backref" href="#toc-entry-6">Other credits</a></h2>
452453
<div class="section" id="maintainers">
453454
<h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
454455
<p>This module is maintained by the OCA.</p>
455-
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
456+
<a class="reference external image-reference" href="https://odoo-community.org">
457+
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
458+
</a>
456459
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
457460
mission is to support the collaborative development of Odoo features and
458461
promote its widespread use.</p>
459462
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
460463
<p><a class="reference external image-reference" href="https://github.com/sbejaoui"><img alt="sbejaoui" src="https://github.com/sbejaoui.png?size=40px" /></a></p>
461-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/brand/tree/17.0/brand">OCA/brand</a> project on GitHub.</p>
464+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/brand/tree/18.0/brand">OCA/brand</a> project on GitHub.</p>
462465
<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>
463466
</div>
464467
</div>

brand/views/res_brand.xml

+10-10
Original file line numberDiff line numberDiff line change
@@ -120,18 +120,18 @@
120120
<field name="image_128" />
121121
<field name="type" />
122122
<templates>
123-
<t t-name="kanban-box">
123+
<t t-name="card">
124124
<div
125-
class="oe_kanban_global_click o_kanban_record_has_image_fill o_res_partner_kanban"
125+
class=" o_kanban_record_has_image_fill o_res_partner_kanban"
126126
>
127127
<t
128128
t-set="placeholder"
129129
t-value="'/base/static/img/company_image.png'"
130130
/>
131-
<div
132-
class="o_kanban_image_fill_left o_kanban_image_full"
133-
t-attf-style="background-image: url(#{kanban_image('res.brand', 'image_128', record.id.raw_value, placeholder)})"
134-
role="img"
131+
<field
132+
name="image_128"
133+
widget="image"
134+
options="{'img_class': 'object-fit-cover'}"
135135
/>
136136
<div class="oe_kanban_details d-flex flex-column">
137137
<strong
@@ -173,21 +173,21 @@
173173
</kanban>
174174
</field>
175175
</record>
176-
<record model="ir.ui.view" id="res_brand_tree_view">
177-
<field name="name">res.brand.tree (in partner_brand)</field>
176+
<record model="ir.ui.view" id="res_brand_list_view">
177+
<field name="name">res.brand.list (in partner_brand)</field>
178178
<field name="model">res.brand</field>
179179
<field name="inherit_id" ref="base.view_partner_tree" />
180180
<field name="mode">primary</field>
181181
<field name="arch" type="xml">
182-
<xpath expr="//tree" position="attributes">
182+
<xpath expr="//list" position="attributes">
183183
<attribute name="string">Brands</attribute>
184184
</xpath>
185185
</field>
186186
</record>
187187
<record model="ir.actions.act_window" id="res_brand_act_window">
188188
<field name="name">Brands</field>
189189
<field name="res_model">res.brand</field>
190-
<field name="view_mode">kanban,tree,form</field>
190+
<field name="view_mode">kanban,list,form</field>
191191
<field name="context">{'default_customer': 0, 'default_supplier': 0,}
192192
</field>
193193
</record>

0 commit comments

Comments
 (0)