Skip to content

Commit

Permalink
[MIG] pos_analytic_by_config: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
peluko00 committed Nov 7, 2024
1 parent 65a69ef commit 2c97f14
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 73 deletions.
4 changes: 4 additions & 0 deletions pos_analytic_by_config/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ Contributors

- David Vidal

- `APSL-Nagarro <https://www.apsl.tech>`__

- Antoni Marroig <amarroig@apsl.net>

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

Expand Down
2 changes: 1 addition & 1 deletion pos_analytic_by_config/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"author": "ACSONE SA/NV, Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-analytic",
"category": "Point Of Sale, Accounting",
"version": "16.0.1.0.0",
"version": "17.0.1.0.0",
"license": "AGPL-3",
"depends": ["point_of_sale"],
"data": [
Expand Down
66 changes: 0 additions & 66 deletions pos_analytic_by_config/migrations/16.0.1.0.0/post-migration.py

This file was deleted.

5 changes: 3 additions & 2 deletions pos_analytic_by_config/models/analytic_distribution_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ class AccountAnalyticDistributionModel(models.Model):
)

def _get_distribution(self, vals):
new_context = vals.copy()
pos_config_id = self.env.context.get("pos_config_id")
if pos_config_id:
vals["pos_config_id"] = pos_config_id
res = super()._get_distribution(vals)
new_context["pos_config_id"] = pos_config_id
res = super()._get_distribution(new_context)
return res
2 changes: 2 additions & 0 deletions pos_analytic_by_config/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@
- Xavier Bouquiaux \<<xavier.bouquiaux@acsone.eu>\>
- [Tecnativa](https://www.tecnativa.com)
- David Vidal
- [APSL-Nagarro](https://www.apsl.tech)
- Antoni Marroig \<<amarroig@apsl.net>\>
15 changes: 11 additions & 4 deletions pos_analytic_by_config/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@

/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.

Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.

See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
Expand Down Expand Up @@ -275,7 +276,7 @@
margin-left: 2em ;
margin-right: 2em }

pre.code .ln { color: grey; } /* line numbers */
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
Expand All @@ -301,7 +302,7 @@
span.pre {
white-space: pre }

span.problematic {
span.problematic, pre.problematic {
color: red }

span.section-subtitle {
Expand Down Expand Up @@ -444,12 +445,18 @@ <h2><a class="toc-backref" href="#toc-entry-7">Contributors</a></h2>
<li>David Vidal</li>
</ul>
</li>
<li><a class="reference external" href="https://www.apsl.tech">APSL-Nagarro</a><ul>
<li>Antoni Marroig &lt;<a class="reference external" href="mailto:amarroig&#64;apsl.net">amarroig&#64;apsl.net</a>&gt;</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<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>
Expand Down
3 changes: 3 additions & 0 deletions pos_analytic_by_config/tests/test_pos_analytic_by_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ def setUpClass(cls):
}
)
cls.config = cls.basic_config
cls.config.payment_method_ids.filtered_domain(
[("type", "=", "cash")]
).split_transactions = False
cls.session = cls.open_new_session(cls)

def _create_order(self):
Expand Down

0 comments on commit 2c97f14

Please sign in to comment.