Ecocentral/Ecologistic#2 add fields for CCPAE certification. Add logo to documents header
This commit is contained in:
parent
53e1a9737f
commit
d340344313
7 changed files with 76 additions and 0 deletions
1
l10n_es_partner_ccpae/__init__.py
Normal file
1
l10n_es_partner_ccpae/__init__.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
from . import models
|
||||
13
l10n_es_partner_ccpae/__manifest__.py
Normal file
13
l10n_es_partner_ccpae/__manifest__.py
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
{
|
||||
"name": "Partner CCPAE",
|
||||
"summary": "Añade los datos del registro de operador CCPAE a los contactos. Añade logo en los albaranes",
|
||||
"version": "16.0.1.0.0",
|
||||
"author": "Criptomart",
|
||||
"website": "https://criptomart.net",
|
||||
"category": "Localization/Europe",
|
||||
"license": "AGPL-3",
|
||||
"depends": ["stock"],
|
||||
"data": ["views/res_partner_view.xml", "report/report_deliveryslip.xml"],
|
||||
"installable": True,
|
||||
}
|
||||
1
l10n_es_partner_ccpae/models/__init__.py
Normal file
1
l10n_es_partner_ccpae/models/__init__.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
from . import partner
|
||||
15
l10n_es_partner_ccpae/models/partner.py
Normal file
15
l10n_es_partner_ccpae/models/partner.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class ResPartner(models.Model):
|
||||
_inherit = "res.partner"
|
||||
|
||||
# Proveedores
|
||||
ccpae_operador = fields.Char(string="Nº de Operador", tracking=True)
|
||||
ccpae_organismo = fields.Char(
|
||||
string="Organismo regulador",
|
||||
default="ES-ECO-019-CT",
|
||||
tracking=True,
|
||||
)
|
||||
22
l10n_es_partner_ccpae/report/report_deliveryslip.xml
Normal file
22
l10n_es_partner_ccpae/report/report_deliveryslip.xml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<odoo>
|
||||
<data>
|
||||
<!-- Inherit the delivery slip report -->
|
||||
<template id="report_external_layout__inherit" inherit_id="web.external_layout_standard">
|
||||
<xpath expr="//div[@name='moto']" position="after">
|
||||
<t t-if="o.partner_id.ccpae_operador">
|
||||
<div class="col-8 mb4 text-right" >
|
||||
<div style="float: right; font-size: 0.8em;">
|
||||
Nº Operador: <span t-field="o.partner_id.ccpae_operador" /><br/>
|
||||
Org. Regulador: <br/><span t-field="o.partner_id.ccpae_organismo" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-1 mb4" >
|
||||
<img src="/l10n_es_partner_ccpae/static/img/ccpae.png"
|
||||
class="oe_structure" style="float: right; width: 60px;"/>
|
||||
<br/>
|
||||
</div>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
</data>
|
||||
</odoo>
|
||||
BIN
l10n_es_partner_ccpae/static/img/ccpae.png
Normal file
BIN
l10n_es_partner_ccpae/static/img/ccpae.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
24
l10n_es_partner_ccpae/views/res_partner_view.xml
Normal file
24
l10n_es_partner_ccpae/views/res_partner_view.xml
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
<record model="ir.ui.view" id="view_partner_form">
|
||||
<field name="name">Add CCPAE data</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form" />
|
||||
<field name="arch" type="xml">
|
||||
<page name="internal_notes" position="after">
|
||||
<page
|
||||
string="Commercial Info"
|
||||
attrs="{'invisible': [('is_company','=',False)]}"
|
||||
>
|
||||
<group>
|
||||
<group>
|
||||
<field name="ccpae_operador" />
|
||||
<field name="ccpae_organismo" />
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</page>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Loading…
Add table
Add a link
Reference in a new issue