[account] +partner name in invoice form and tree view for all groups
authorLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Thu, 17 Jan 2013 17:18:18 +0000 (18:18 +0100)
committerLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Thu, 17 Jan 2013 17:18:18 +0000 (18:18 +0100)
__init__.py [new file with mode: 0644]
__openerp__.py [new file with mode: 0644]
view/account_invoice.xml [new file with mode: 0644]

diff --git a/__init__.py b/__init__.py
new file mode 100644 (file)
index 0000000..f7f42c7
--- /dev/null
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    lhc_custom_oe module for OpenERP, Customize OpenERP for L'Heureux Cyclage
+#    Copyright (C) 2013 L'Heureux Cyclage (<http://www.heureux-cyclage.org>)
+#
+#    This file is a part of lhc_custom_oe
+#
+#    lhc_custom_oe is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    lhc_custom_oe is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/__openerp__.py b/__openerp__.py
new file mode 100644 (file)
index 0000000..7a2292c
--- /dev/null
@@ -0,0 +1,45 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    lhc_custom_oe module for OpenERP, Customize OpenERP for L'Heureux Cyclage
+#    Copyright (C) 2013 L'Heureux Cyclage (<http://www.heureux-cyclage.org>)
+#
+#    This file is a part of lhc_custom_oe
+#
+#    lhc_custom_oe is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    lhc_custom_oe is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+{
+    'name': 'Custom OpenERP for LHC',
+    'version': '0.1',
+    'category': 'Association',
+    'complexity': "normal",
+    'description': """
+
+Module pour les personnalisations de L'Heureux Cyclage
+======================================================
+    """,
+    'author': 'L\'Heureux Cyclage',
+    'website': 'http://www.heureux-cyclage.org',
+    'depends': [
+        'account',
+    ],
+    'update_xml': [
+        'view/account_invoice.xml',
+    ],
+    'installable': True,
+    'auto_install': False,
+    'images': [],
+}
diff --git a/view/account_invoice.xml b/view/account_invoice.xml
new file mode 100644 (file)
index 0000000..7f0d0da
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+    <data>
+        <record id="view_invoice_form" model="ir.ui.view">
+            <field name="name">account.invoice.form</field>
+            <field name="model">account.invoice</field>
+            <field name="type">form</field>
+            <field name="inherit_id" ref="account.invoice_form"/>
+            <field name="arch" type="xml">
+                <xpath expr="//field[@name='partner_id']" position="replace">
+                    <field string="Customer" name="partner_id" on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id)" context="{'search_default_customer': 1}"/>
+                </xpath>
+            </field>
+        </record>
+        
+        <record id="view_invoice_tree" model="ir.ui.view">
+            <field name="name">account.invoice.tree</field>
+            <field name="model">account.invoice</field>
+            <field name="type">tree</field>
+            <field name="inherit_id" ref="account.invoice_tree"/>
+            <field name="arch" type="xml">
+                <xpath expr="//field[@name='partner_id']" position="replace">
+                    <field name="partner_id"/>
+                </xpath>
+            </field>
+        </record>
+    </data>
+</openerp>