Skip to content

Commit d85d53f

Browse files
committed
[MIG] sale_analytic_tag: Migration to 18.0
TT57844
1 parent 6b6a0b0 commit d85d53f

File tree

5 files changed

+33
-43
lines changed

5 files changed

+33
-43
lines changed

sale_analytic_tag/README.rst

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
.. image:: https://odoo-community.org/readme-banner-image
2-
:target: https://odoo-community.org/get-involved?utm_source=readme
3-
:alt: Odoo Community Association
4-
51
=================
62
Sale Analytic Tag
73
=================
@@ -17,17 +13,17 @@ Sale Analytic Tag
1713
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
1814
:target: https://odoo-community.org/page/development-status
1915
:alt: Beta
20-
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
2117
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
2218
:alt: License: AGPL-3
2319
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--analytic-lightgray.png?logo=github
24-
:target: https://github.com/OCA/account-analytic/tree/17.0/sale_analytic_tag
20+
:target: https://github.com/OCA/account-analytic/tree/18.0/sale_analytic_tag
2521
:alt: OCA/account-analytic
2622
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
27-
:target: https://translation.odoo-community.org/projects/account-analytic-17-0/account-analytic-17-0-sale_analytic_tag
23+
:target: https://translation.odoo-community.org/projects/account-analytic-18-0/account-analytic-18-0-sale_analytic_tag
2824
:alt: Translate me on Weblate
2925
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
30-
:target: https://runboat.odoo-community.org/builds?repo=OCA/account-analytic&target_branch=17.0
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/account-analytic&target_branch=18.0
3127
:alt: Try me on Runboat
3228

3329
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -46,7 +42,7 @@ Bug Tracker
4642
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-analytic/issues>`_.
4743
In case of trouble, please check there if your issue has already been reported.
4844
If you spotted it first, help us to smash it by providing a detailed and welcomed
49-
`feedback <https://github.com/OCA/account-analytic/issues/new?body=module:%20sale_analytic_tag%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
45+
`feedback <https://github.com/OCA/account-analytic/issues/new?body=module:%20sale_analytic_tag%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
5046

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

@@ -61,14 +57,14 @@ Authors
6157
Contributors
6258
------------
6359

64-
- `Tecnativa <https://www.tecnativa.com>`__:
60+
- `Tecnativa <https://www.tecnativa.com>`__:
6561

66-
- Víctor Martínez
67-
- Pedro M. Baeza
62+
- Víctor Martínez
63+
- Pedro M. Baeza
6864

69-
- `APSL-Nagarro <https://apsl.tech>`__:
65+
- `APSL-Nagarro <https://apsl.tech>`__:
7066

71-
- Antoni Marroig <[email protected]>
67+
- Antoni Marroig <[email protected]>
7268

7369
Maintainers
7470
-----------
@@ -91,6 +87,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
9187

9288
|maintainer-victoralmau|
9389

94-
This module is part of the `OCA/account-analytic <https://github.com/OCA/account-analytic/tree/17.0/sale_analytic_tag>`_ project on GitHub.
90+
This module is part of the `OCA/account-analytic <https://github.com/OCA/account-analytic/tree/18.0/sale_analytic_tag>`_ project on GitHub.
9591

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

sale_analytic_tag/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
33
{
44
"name": "Sale Analytic Tag",
5-
"version": "17.0.1.0.0",
5+
"version": "18.0.1.0.0",
66
"category": "Accounting & Finance",
77
"website": "https://github.com/OCA/account-analytic",
88
"author": "Tecnativa, Odoo Community Association (OCA)",

sale_analytic_tag/static/description/index.html

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
55
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
6-
<title>README.rst</title>
6+
<title>Sale Analytic Tag</title>
77
<style type="text/css">
88

99
/*
@@ -360,21 +360,16 @@
360360
</style>
361361
</head>
362362
<body>
363-
<div class="document">
363+
<div class="document" id="sale-analytic-tag">
364+
<h1 class="title">Sale Analytic Tag</h1>
364365

365-
366-
<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
367-
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
368-
</a>
369-
<div class="section" id="sale-analytic-tag">
370-
<h1>Sale Analytic Tag</h1>
371366
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
372367
!! This file is generated by oca-gen-addon-readme !!
373368
!! changes will be overwritten. !!
374369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375370
!! source digest: sha256:3dc32728f4d2687a71f8111e0e646e2ada4bcb65a3a3ae728a45ddd505d939bd
376371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
377-
<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/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/account-analytic/tree/17.0/sale_analytic_tag"><img alt="OCA/account-analytic" src="https://img.shields.io/badge/github-OCA%2Faccount--analytic-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-analytic-17-0/account-analytic-17-0-sale_analytic_tag"><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/account-analytic&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/account-analytic/tree/18.0/sale_analytic_tag"><img alt="OCA/account-analytic" src="https://img.shields.io/badge/github-OCA%2Faccount--analytic-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-analytic-18-0/account-analytic-18-0-sale_analytic_tag"><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/account-analytic&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
378373
<p>The module restores the possibility of defining analytical tags in sale
379374
order lines so that the analytical items generated have those tags.</p>
380375
<p><strong>Table of contents</strong></p>
@@ -390,23 +385,23 @@ <h1>Sale Analytic Tag</h1>
390385
</ul>
391386
</div>
392387
<div class="section" id="bug-tracker">
393-
<h2><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h2>
388+
<h1><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h1>
394389
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-analytic/issues">GitHub Issues</a>.
395390
In case of trouble, please check there if your issue has already been reported.
396391
If you spotted it first, help us to smash it by providing a detailed and welcomed
397-
<a class="reference external" href="https://github.com/OCA/account-analytic/issues/new?body=module:%20sale_analytic_tag%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
392+
<a class="reference external" href="https://github.com/OCA/account-analytic/issues/new?body=module:%20sale_analytic_tag%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
398393
<p>Do not contact contributors directly about support or help with technical issues.</p>
399394
</div>
400395
<div class="section" id="credits">
401-
<h2><a class="toc-backref" href="#toc-entry-2">Credits</a></h2>
396+
<h1><a class="toc-backref" href="#toc-entry-2">Credits</a></h1>
402397
<div class="section" id="authors">
403-
<h3><a class="toc-backref" href="#toc-entry-3">Authors</a></h3>
398+
<h2><a class="toc-backref" href="#toc-entry-3">Authors</a></h2>
404399
<ul class="simple">
405400
<li>Tecnativa</li>
406401
</ul>
407402
</div>
408403
<div class="section" id="contributors">
409-
<h3><a class="toc-backref" href="#toc-entry-4">Contributors</a></h3>
404+
<h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
410405
<ul class="simple">
411406
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
412407
<li>Víctor Martínez</li>
@@ -420,7 +415,7 @@ <h3><a class="toc-backref" href="#toc-entry-4">Contributors</a></h3>
420415
</ul>
421416
</div>
422417
<div class="section" id="maintainers">
423-
<h3><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h3>
418+
<h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
424419
<p>This module is maintained by the OCA.</p>
425420
<a class="reference external image-reference" href="https://odoo-community.org">
426421
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
@@ -430,11 +425,10 @@ <h3><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h3>
430425
promote its widespread use.</p>
431426
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
432427
<p><a class="reference external image-reference" href="https://github.com/victoralmau"><img alt="victoralmau" src="https://github.com/victoralmau.png?size=40px" /></a></p>
433-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-analytic/tree/17.0/sale_analytic_tag">OCA/account-analytic</a> project on GitHub.</p>
428+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-analytic/tree/18.0/sale_analytic_tag">OCA/account-analytic</a> project on GitHub.</p>
434429
<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>
435430
</div>
436431
</div>
437432
</div>
438-
</div>
439433
</body>
440434
</html>

sale_analytic_tag/tests/test_sale_analytic_tag.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
# Copyright 2023 Tecnativa - Víctor Martínez
22
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3-
from odoo.tests import Form, common, tagged
3+
from odoo.tests import Form, tagged
44

5-
from odoo.addons.base.tests.common import DISABLED_MAIL_CONTEXT
5+
from odoo.addons.base.tests.common import BaseCommon
66

77

88
@tagged("-at_install", "post_install")
9-
class TestSaleAnalyticTag(common.TransactionCase):
9+
class TestSaleAnalyticTag(BaseCommon):
1010
@classmethod
1111
def setUpClass(cls):
1212
super().setUpClass()
13-
cls.env = cls.env(context=dict(cls.env.context, **DISABLED_MAIL_CONTEXT))
1413
cls.customer = cls.env["res.partner"].create({"name": "Test customer"})
1514
cls.product = cls.env["product.product"].create({"name": "Test product"})
1615
cls.plan = cls.env["account.analytic.plan"].create(
@@ -33,13 +32,14 @@ def setUpClass(cls):
3332
aa_tag_model = cls.env["account.analytic.tag"]
3433
cls.analytic_tag_1 = aa_tag_model.create({"name": "Test tag 1"})
3534
cls.analytic_tag_2 = aa_tag_model.create({"name": "Test tag 2"})
36-
cls.order = cls.create_sale_order(cls)
35+
cls.order = cls.create_sale_order()
3736

38-
def create_sale_order(self):
39-
order_form = Form(self.env["sale.order"])
40-
order_form.partner_id = self.customer
37+
@classmethod
38+
def create_sale_order(cls):
39+
order_form = Form(cls.env["sale.order"])
40+
order_form.partner_id = cls.customer
4141
with order_form.order_line.new() as line_form:
42-
line_form.product_id = self.product
42+
line_form.product_id = cls.product
4343
return order_form.save()
4444

4545
def _action_confirm_create_invoice(self):

sale_analytic_tag/views/sale_order_view.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<field name="inherit_id" ref="sale.view_order_form" />
77
<field name="arch" type="xml">
88
<xpath
9-
expr="//field[@name='order_line']/tree/field[@name='analytic_distribution']"
9+
expr="//field[@name='order_line']/list/field[@name='analytic_distribution']"
1010
position="after"
1111
>
1212
<field

0 commit comments

Comments
 (0)