Skip to content

Commit

Permalink
[MIG] currency_rate_update: Migration to 18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tupaq committed Oct 23, 2024
1 parent 74fdefa commit a4e3a10
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 73 deletions.
88 changes: 44 additions & 44 deletions currency_rate_update/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,27 @@ Currency Rate Update
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcurrency-lightgray.png?logo=github
:target: https://github.com/OCA/currency/tree/17.0/currency_rate_update
:target: https://github.com/OCA/currency/tree/18.0/currency_rate_update
:alt: OCA/currency
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/currency-17-0/currency-17-0-currency_rate_update
:target: https://translation.odoo-community.org/projects/currency-18-0/currency-18-0-currency_rate_update
: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/currency&target_branch=17.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/currency&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module provides base for building exchange rates providers and
bundles following built-in providers:

- **European Central Bank** (ported by Grzegorz Grzelak -
OpenGLOBE.pl): reference rates are based on the regular daily
query procedure between central banks within and outside the
European System of Central Banks, which normally takes place at
2:15 p.m. (14:15) ECB time. Source is in EUR, for more details see
`corresponding ECB
page <https://www.ecb.europa.eu/stats/policy_and_exchange_rates/euro_reference_exchange_rates/html/index.en.html>`__.
- **European Central Bank** (ported by Grzegorz Grzelak -
OpenGLOBE.pl): reference rates are based on the regular daily query
procedure between central banks within and outside the European
System of Central Banks, which normally takes place at 2:15 p.m.
(14:15) ECB time. Source is in EUR, for more details see
`corresponding ECB
page <https://www.ecb.europa.eu/stats/policy_and_exchange_rates/euro_reference_exchange_rates/html/index.en.html>`__.

This module is compatible with ``currency_rate_inverted`` module
provided by OCA, that allows to maintain exchange rates in inverted
Expand Down Expand Up @@ -76,7 +76,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/currency/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/currency/issues/new?body=module:%20currency_rate_update%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/currency/issues/new?body=module:%20currency_rate_update%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 @@ -92,38 +92,38 @@ Authors
Contributors
------------

- Nicolas Bessi <[email protected]>
- Jean-Baptiste Aubort <[email protected]>
- Joël Grand-Guillaume <[email protected]>
- Grzegorz Grzelak <[email protected]> (ECB, NBP)
- Vincent Renaville <[email protected]>
- Yannick Vaucher <[email protected]>
- Guewen Baconnier <[email protected]>
- Lorenzo Battistini <[email protected]> (Port to V7)
- Agustin Cruz <openpyme.mx> (BdM)
- Jacque-Etienne Baudoux <[email protected]>
- Juan Jose Scarafia <[email protected]>
- Mathieu Benoi <[email protected]>
- Fekete Mihai <[email protected]> (Port to V8)
- Dorin Hongu <[email protected]> (BNR)
- Paul McDermott
- Alexis de Lattre <[email protected]>
- Miku Laitinen
- Assem Bayahi
- Daniel Dico <[email protected]> (BOC)
- Dmytro Katyukha <[email protected]>
- Jesús Ventosinos Mayor <[email protected]>
- `CorporateHub <https://corporatehub.eu/>`__

- Alexey Pelykh <[email protected]>

- `Quartile Limited <https://www.quartile.co/>`__:

- Tatsuki Kanda <[email protected]>

- `Komit Company Limited <https://komit-consulting.com/>`__:

- Quoc Pham Ngoc <[email protected]>
- Nicolas Bessi <[email protected]>
- Jean-Baptiste Aubort <[email protected]>
- Joël Grand-Guillaume <[email protected]>
- Grzegorz Grzelak <[email protected]> (ECB, NBP)
- Vincent Renaville <[email protected]>
- Yannick Vaucher <[email protected]>
- Guewen Baconnier <[email protected]>
- Lorenzo Battistini <[email protected]> (Port to V7)
- Agustin Cruz <openpyme.mx> (BdM)
- Jacque-Etienne Baudoux <[email protected]>
- Juan Jose Scarafia <[email protected]>
- Mathieu Benoi <[email protected]>
- Fekete Mihai <[email protected]> (Port to V8)
- Dorin Hongu <[email protected]> (BNR)
- Paul McDermott
- Alexis de Lattre <[email protected]>
- Miku Laitinen
- Assem Bayahi
- Daniel Dico <[email protected]> (BOC)
- Dmytro Katyukha <[email protected]>
- Jesús Ventosinos Mayor <[email protected]>
- `CorporateHub <https://corporatehub.eu/>`__

- Alexey Pelykh <[email protected]>

- `Quartile Limited <https://www.quartile.co/>`__:

- Tatsuki Kanda <[email protected]>

- `Komit Company Limited <https://komit-consulting.com/>`__:

- Quoc Pham Ngoc <[email protected]>

Maintainers
-----------
Expand All @@ -138,6 +138,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/currency <https://github.com/OCA/currency/tree/17.0/currency_rate_update>`_ project on GitHub.
This module is part of the `OCA/currency <https://github.com/OCA/currency/tree/18.0/currency_rate_update>`_ 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 currency_rate_update/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

{
"name": "Currency Rate Update",
"version": "17.0.1.0.1",
"version": "18.0.1.0.1",
"author": "Camptocamp, CorporateHub, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/currency",
"license": "AGPL-3",
Expand Down
2 changes: 0 additions & 2 deletions currency_rate_update/data/cron.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@
<field name="name">Currency Rates Update (OCA) daily</field>
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="numbercall">-1</field>
<field name="state">code</field>
<field name="nextcall">2019-01-01 00:01:00</field>
<field name="doall" eval="False" />
<field
name="model_id"
ref="currency_rate_update.model_res_currency_rate_provider"
Expand Down
10 changes: 4 additions & 6 deletions currency_rate_update/models/res_currency_rate_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ def _update(self, date_from, date_to, newest_only=False):
except BaseException as e:
_logger.warning(
(
f'Currency Rate Provider "{provider.name}" failed to obtain data since'
f" {date_from} until {date_to}"
f'Currency Rate Provider "{provider.name}" failed to '
f"obtain data since {date_from} until {date_to}"
),
exc_info=True,
)
Expand Down Expand Up @@ -280,10 +280,8 @@ def _scheduled_update(self):
]
)
if providers:
_logger.info(
"Scheduled currency rates update of: %s"
% ", ".join(providers.mapped("name"))
)
provider_names = ", ".join(providers.mapped("name"))
_logger.info(f"Scheduled currency rates update of: {provider_names}")
for provider in providers.with_context(**{"scheduled": True}):
date_from = (
(provider.last_successful_run + relativedelta(days=1))
Expand Down
14 changes: 7 additions & 7 deletions currency_rate_update/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,16 +369,16 @@ <h1 class="title">Currency Rate Update</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:659a6410e298c2df48863fc47d12b61338f5a34971ec35cb5bd4b0e388c96b76
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/currency/tree/17.0/currency_rate_update"><img alt="OCA/currency" src="https://img.shields.io/badge/github-OCA%2Fcurrency-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/currency-17-0/currency-17-0-currency_rate_update"><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/currency&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="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/currency/tree/18.0/currency_rate_update"><img alt="OCA/currency" src="https://img.shields.io/badge/github-OCA%2Fcurrency-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/currency-18-0/currency-18-0-currency_rate_update"><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/currency&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 provides base for building exchange rates providers and
bundles following built-in providers:</p>
<blockquote>
<ul class="simple">
<li><strong>European Central Bank</strong> (ported by Grzegorz Grzelak -
OpenGLOBE.pl): reference rates are based on the regular daily
query procedure between central banks within and outside the
European System of Central Banks, which normally takes place at
2:15 p.m. (14:15) ECB time. Source is in EUR, for more details see
OpenGLOBE.pl): reference rates are based on the regular daily query
procedure between central banks within and outside the European
System of Central Banks, which normally takes place at 2:15 p.m.
(14:15) ECB time. Source is in EUR, for more details see
<a class="reference external" href="https://www.ecb.europa.eu/stats/policy_and_exchange_rates/euro_reference_exchange_rates/html/index.en.html">corresponding ECB
page</a>.</li>
</ul>
Expand Down Expand Up @@ -421,7 +421,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/currency/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/currency/issues/new?body=module:%20currency_rate_update%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/currency/issues/new?body=module:%20currency_rate_update%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 @@ -480,7 +480,7 @@ <h2><a class="toc-backref" href="#toc-entry-7">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/currency/tree/17.0/currency_rate_update">OCA/currency</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/currency/tree/18.0/currency_rate_update">OCA/currency</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
5 changes: 1 addition & 4 deletions currency_rate_update/views/res_currency_rate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@
<field name="inherit_id" ref="base.view_currency_rate_form" />
<field name="arch" type="xml">
<form position="inside">
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" />
<field name="message_ids" widget="mail_thread" />
</div>
<chatter />
</form>
<field name="rate" position="after">
<field name="provider_id" readonly="1" />
Expand Down
15 changes: 6 additions & 9 deletions currency_rate_update/views/res_currency_rate_provider.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@
</field>
</record>
<record model="ir.ui.view" id="res_currency_rate_provider_tree_view">
<field name="name">res.currency.rate.provider.tree</field>
<field name="name">res.currency.rate.provider.list</field>
<field name="model">res.currency.rate.provider</field>
<field name="arch" type="xml">
<tree>
<list>
<field name="service" />
<field name="company_id" groups="base.group_multi_company" />
<field name="update_schedule" />
<field name="available_currency_ids" column_invisible="True" />
<field name="currency_ids" widget="many2many_tags" />
<field name="daily" column_invisible="True" />
<field name="next_run" invisible="daily" />
</tree>
<field name="next_run" invisible="True" />
</list>
</field>
</record>
<record model="ir.ui.view" id="res_currency_rate_provider_form_view">
Expand Down Expand Up @@ -94,10 +94,7 @@
</group>
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" />
<field name="message_ids" widget="mail_thread" />
</div>
<chatter />
</form>
</field>
</record>
Expand Down Expand Up @@ -132,7 +129,7 @@
<record model="ir.actions.act_window" id="action_res_currency_rate_provider">
<field name="name">Currency Rates Providers</field>
<field name="res_model">res.currency.rate.provider</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">list,form</field>
</record>
<menuitem
id="menu_res_currency_rate_provider"
Expand Down

0 comments on commit a4e3a10

Please sign in to comment.