Add glue module account_invoice_transmit_method_street3 with auto_install=True

This commit is contained in:
Alexis de Lattre
2018-04-15 00:45:03 +02:00
parent 4d7102d699
commit 3fdc3b4256
3 changed files with 50 additions and 0 deletions

View File

@@ -0,0 +1 @@
# -*- coding: utf-8 -*-

View File

@@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'partner_address_street3 / account_invoice_transmit_method compat.',
'version': '10.0.0.1.0',
'category': 'Partner',
'license': 'AGPL-3',
'summary': 'Compatibility between partner_address_street3 and account_invoice_transmit_method',
'description': """
Glue module between partner_address_street3 and account_invoice_transmit_method
===============================================================================
Stupid technical module to workaround an Odoo framework limitation about the inherit of the context attribute in a view.
""",
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': ['partner_address_street3', 'account_invoice_transmit_method'],
'data': [
'partner_view.xml',
],
'installable': True,
'auto_install': True,
}

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2018 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<record id="view_partner_form" model="ir.ui.view">
<field name="name">Compatibility partner_address_street3 / account_invoice_transmit_method</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="priority">1000</field>
<field name="arch" type="xml">
<field name="child_ids" position="attributes">
<attribute name="context">{'default_parent_id': active_id, 'default_street': street, 'default_street2': street2, 'default_city': city, 'default_state_id': state_id, 'default_zip': zip, 'default_country_id': country_id, 'default_supplier': supplier, 'default_customer': customer, 'default_lang': lang, 'default_customer_invoice_transmit_method_code': customer_invoice_transmit_method_code, 'default_supplier_invoice_transmit_method_code': supplier_invoice_transmit_method_code, 'default_street3': street3}</attribute>
</field>
</field>
</record>
</odoo>