Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into micro_formacio_sastre
Browse files Browse the repository at this point in the history
  • Loading branch information
destanyol committed Jul 29, 2024
2 parents d708eaa + 733e384 commit 196a415
Show file tree
Hide file tree
Showing 22 changed files with 532 additions and 79 deletions.
1 change: 1 addition & 0 deletions som_account_invoice_pending/__terp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"giscedata_polissa_crm",
"giscedata_facturacio_comer_bono_social",
"giscedata_atc",
"giscedata_facturacio_comer_som",
],
"init_xml": [
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,28 @@ import_factura = object.residual
<field name="def_body_text"><![CDATA[<!doctype html><html>Missatge generat automaticament</html>]]>
</field>
</record>

<record model="poweremail.templates" id="email_impagament_1er_avis_fraccionament_cancelat">
<field name="name">Impagament 1r Avís - Fraccionament cancel·lat</field>
<field name="object_name" model="ir.model" search="[('model', '=', 'giscedata.facturacio.factura')]"/>
<field name="model_int_name">giscedata.facturacio.factura</field>
<field name="save_to_drafts" eval="0"/>
<field name="use_filter" eval="0"/>
<field name="file_name">Recibo_${object.number}_N57.pdf</field>
<field name="def_to">${object.address_invoice_id.email}, ${object.polissa_id.direccio_notificacio.email}</field>
<field name="def_bcc">[email protected]</field>
<field name="auto_email" eval="0"/>
<field name="single_email" eval="0"/>
<field name="report_template" ref="giscedata_facturacio.report_rebut"/>
<field name="use_sign" eval="0"/>
<field name="def_subject">[FACTURA IMPAGADA - FRACCIONAMENT CANCEL·LAT] Som Energia factura ${object.polissa_id.name}</field>
<field name="template_language">mako</field>
<field name="send_on_create" eval="0"/>
<field name="lang">${object.invoice_id.partner_id.lang}</field>
<field name="send_on_write" eval="0"/>
<field name="def_body_text"><![CDATA[<!doctype html><html>Missatge generat automaticament</html>]]>
</field>
</record>
</data>

<data noupdate="1">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-
import logging
from oopgrade.oopgrade import load_data_records


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

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

# Actualitzar una part de l'XML (cal posar la id del record)
logger.info("Updating XMLs")
list_of_records = [
"email_impagament_1er_avis_fraccionament_cancelat",
]
load_data_records(
cursor, 'som_account_invoice_pending', 'data/som_account_invoice_pending_data.xml',
list_of_records, mode='update'
)
logger.info("XMLs succesfully updated.")


def down(cursor, installed_version):
pass


migrate = up
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# -*- encoding: utf-8 -*-
import logging
from oopgrade.oopgrade import load_data_records


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

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

# Actualitzar un XML/CSV sencer
logger.info("Updating XMLs")
xmls = [
"views/som_crawlers_task_view.xml",
]
records = [
"view_som_crawlers_task_form",
]
for xml_w in xmls:
load_data_records(
cursor, 'som_crawlers', xml_w, records, mode='update'
)
logger.info("XMLs succesfully updatd.")


def down(cursor, installed_version):
pass


migrate = up
2 changes: 1 addition & 1 deletion som_crawlers/views/som_crawlers_task_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</group>
<field name="ultima_tasca_executada" select = '1'/>
<group colspan="6" col="2" string="Execucions realitzades per la tasca">
<field name="run_ids" height="300" nolabel="1" widget="one2many_list"/>
<field name="run_ids" height="300" nolabel="1" widget="one2many_list" widget_props="{'infinite': true}" />
</group>
</form>
</field>
Expand Down
3 changes: 3 additions & 0 deletions som_gurb/demo/som_gurb_demo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
<field name="pricelist_id" ref="pricelist_gurb_demo" ></field>
<field name="generation_power">10</field>
</record>
<record model="product.pricelist" id="giscedata_facturacio.pricelist_tarifas_electricidad">
<field name="dies_renovacio">30</field>
</record>
</data>
</openerp>
Loading

0 comments on commit 196a415

Please sign in to comment.