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

Canviar nombres de los enlazes de la PR 22898 #787

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
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
26 changes: 26 additions & 0 deletions som_facturacio_flux_solar/giscedata_bateria_virtual.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,31 @@
</field>
</field>
</record>
<record id="view_giscedata_import_bateria_virtual_tree_inherit" model="ir.ui.view">
<field name="name">view_giscedata_import_bateria_virtual_tree_inherit</field>
<field name="model">giscedata.bateria.virtual.resum.facturacio</field>
<field name="inherit_id" ref="giscedata_facturacio_bateria_virtual.view_giscedata_import_bateria_virtual_tree"/>
<field name="arch" type="xml">
<xpath expr="/tree[@string=&quot;Detalls d'import de bateria virtual&quot;]" position="attributes">
<attribute name="string">Detall sols generats i aplicats</attribute>
</xpath>
</field>
</record>

<record id="giscedata_facturacio_bateria_virtual.act_giscedata_import_bateria_virtual" model="ir.actions.act_window">
<field name="name">Detall sols generats i aplicats</field>
</record>

<record id="giscedata_facturacio_bateria_virtual.value_giscedata_import_bateria_virtual" model="ir.values">
<field name="name">Detall sols generats i aplicats</field>
</record>

<record id="giscedata_facturacio_bateria_virtual.act_giscedata_import_bateria_virtual_polissa" model="ir.actions.act_window">
<field name="name">Detall sols generats i aplicats</field>
</record>

<record id="giscedata_facturacio_bateria_virtual.value_giscedata_import_bateria_virtual_polissa" model="ir.values">
<field name="name">Detall sols generats i aplicats</field>
</record>
</data>
</openerp>
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# -*- coding: utf-8 -*-
import logging
import pooler
from oopgrade.oopgrade import load_data_records
from tools import config


def up(cursor, installed_version):
if not installed_version:
return

try:
if config.updating_all:
return
except Exception as e:
pass

logger = logging.getLogger('openerp.migration')

logger.info("Creating pooler")
pool = pooler.get_pool(cursor.dbname)

##UPDATAR UNA PART DE L'XML (POSAR LA ID)##
logger.info("Updating XMLs")
list_of_records = [
"view_giscedata_import_bateria_virtual_tree_inherit",
"giscedata_facturacio_bateria_virtual.act_giscedata_import_bateria_virtual",
"giscedata_facturacio_bateria_virtual.value_giscedata_import_bateria_virtual",
"giscedata_facturacio_bateria_virtual.act_giscedata_import_bateria_virtual_polissa",
"giscedata_facturacio_bateria_virtual.value_giscedata_import_bateria_virtual_polissa",
]
load_data_records(
cursor, 'som_facturacio_flux_solar', 'giscedata_bateria_virtual.xml', list_of_records, mode='update'
)
logger.info("XMLs succesfully updated.")


def down(cursor, installed_version):
pass


migrate = up
Loading