Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0][FIX] l10n_it_ricevute_bancarie: migration script for rules #3837

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions l10n_it_ricevute_bancarie/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ITA - Ricevute bancarie
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:2398111be2cd5f0e84c6061763dda376d13f4045766e34d14077afee27213ea2
!! source digest: sha256:4efa905cc1cf75212973b713c6c79f7451829325a8737bc204ddc58303c87426
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down Expand Up @@ -131,7 +131,9 @@ Contributors
* Sergio Zanchetta <https://github.com/primes2h>
* Simone Vanin <simone.vanin@agilebg.com>
* Sergio Corato <https://github.com/sergiocorato>
* Giovanni Serra <giovanni@gslab.it>

* `Ooops <https://www.ooops404.com>`_:
* Giovanni Serra <giovanni@gslab.it>

Maintainers
~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion l10n_it_ricevute_bancarie/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

{
"name": "ITA - Ricevute bancarie",
"version": "14.0.1.8.1",
"version": "14.0.1.8.2",
"development_status": "Beta",
"author": "Odoo Community Association (OCA)",
"category": "Localization/Italy",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version='1.0' encoding='utf-8' ?>
<odoo>
<!-- Multi - Company Rules -->
<record id="riba_distinta_company_rule" model="ir.rule">
<field name="name">Ri.Ba. distinta multi-company</field>
<field name="model_id" ref="l10n_it_ricevute_bancarie.model_riba_distinta" />
<field name="global" eval="True" />
<field name="domain_force">
['|',('company_id','=',False),('company_id','in',company_ids)]
</field>
</record>

<record id="riba_distinta_line_company_rule" model="ir.rule">
<field name="name">Ri.Ba. distinta line multi-company</field>
<field
name="model_id"
ref="l10n_it_ricevute_bancarie.model_riba_distinta_line"
/>
<field name="global" eval="True" />
<field name="domain_force">
['|',('company_id','=',False),('company_id','in',company_ids)]
</field>
</record>

<record id="riba_configuration_company_rule" model="ir.rule">
<field name="name">Ri.Ba. configuration multi-company</field>
<field
name="model_id"
ref="l10n_it_ricevute_bancarie.model_riba_configuration"
/>
<field name="global" eval="True" />
<field name="domain_force">
['|',('company_id','=',False),('company_id','in',company_ids)]
</field>
</record>
</odoo>
14 changes: 14 additions & 0 deletions l10n_it_ricevute_bancarie/migrations/14.0.1.8.2/post-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from openupgradelib import openupgrade

_delete_xmlids = ["l10n_it_ricevute_bancarie.riba_config_company_rule"]


@openupgrade.migrate()
def migrate(env, version):

openupgrade.load_data(
env.cr,
"l10n_it_ricevute_bancarie",
"migrations/14.0.1.8.2/noupdate_changes.xml",
)
openupgrade.delete_records_safely_by_xml_id(env, _delete_xmlids)
4 changes: 3 additions & 1 deletion l10n_it_ricevute_bancarie/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@
* Sergio Zanchetta <https://github.com/primes2h>
* Simone Vanin <simone.vanin@agilebg.com>
* Sergio Corato <https://github.com/sergiocorato>
* Giovanni Serra <giovanni@gslab.it>

* `Ooops <https://www.ooops404.com>`_:
* Giovanni Serra <giovanni@gslab.it>
6 changes: 4 additions & 2 deletions l10n_it_ricevute_bancarie/static/description/index.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
Expand Down Expand Up @@ -366,7 +367,7 @@ <h1 class="title">ITA - Ricevute bancarie</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:2398111be2cd5f0e84c6061763dda376d13f4045766e34d14077afee27213ea2
!! source digest: sha256:4efa905cc1cf75212973b713c6c79f7451829325a8737bc204ddc58303c87426
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/l10n-italy/tree/14.0/l10n_it_ricevute_bancarie"><img alt="OCA/l10n-italy" src="https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/l10n-italy-14-0/l10n-italy-14-0-l10n_it_ricevute_bancarie"><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/l10n-italy&amp;target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><strong>Italiano</strong></p>
Expand Down Expand Up @@ -466,7 +467,8 @@ <h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
<li>Sergio Zanchetta &lt;<a class="reference external" href="https://github.com/primes2h">https://github.com/primes2h</a>&gt;</li>
<li>Simone Vanin &lt;<a class="reference external" href="mailto:simone.vanin&#64;agilebg.com">simone.vanin&#64;agilebg.com</a>&gt;</li>
<li>Sergio Corato &lt;<a class="reference external" href="https://github.com/sergiocorato">https://github.com/sergiocorato</a>&gt;</li>
<li>Giovanni Serra &lt;<a class="reference external" href="mailto:giovanni&#64;gslab.it">giovanni&#64;gslab.it</a>&gt;</li>
<li><a class="reference external" href="https://www.ooops404.com">Ooops</a>:
* Giovanni Serra &lt;<a class="reference external" href="mailto:giovanni&#64;gslab.it">giovanni&#64;gslab.it</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
Expand Down
Loading