← Back to team overview

openerp-community-reviewer team mailing list archive

[Merge] lp:~camptocamp/account-invoicing/invoice_sequence_module_vre into lp:account-invoicing

 

Vincent Renaville@camptocamp has proposed merging lp:~camptocamp/account-invoicing/invoice_sequence_module_vre into lp:account-invoicing.

Requested reviews:
  Account Core Editors (account-core-editors)

For more details, see:
https://code.launchpad.net/~camptocamp/account-invoicing/invoice_sequence_module_vre/+merge/189775

This module allow the possibility to order invoice line based on a sequence number.
-- 
https://code.launchpad.net/~camptocamp/account-invoicing/invoice_sequence_module_vre/+merge/189775
Your team Account Core Editors is requested to review the proposed merge of lp:~camptocamp/account-invoicing/invoice_sequence_module_vre into lp:account-invoicing.
=== added directory 'invoice_sequence'
=== added file 'invoice_sequence/__init__.py'
--- invoice_sequence/__init__.py	1970-01-01 00:00:00 +0000
+++ invoice_sequence/__init__.py	2013-10-08 07:58:32 +0000
@@ -0,0 +1,24 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Author Tiny SPRL 2004-2009
+#    Author Joel Grand-Guillaume and Vincent Renaville Copyright 2009-2013 Camptocamp SA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program 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 Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from . import invoice
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'invoice_sequence/__openerp__.py'
--- invoice_sequence/__openerp__.py	1970-01-01 00:00:00 +0000
+++ invoice_sequence/__openerp__.py	2013-10-08 07:58:32 +0000
@@ -0,0 +1,39 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Author Tiny SPRL 2004-2009
+#    Author Vincent Renaville Copyright 2009-2013 Camptocamp SA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program 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 Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+{
+    'name': 'Invoice lines with sequence number',
+    'version': '0.1',
+    'category': 'Generic Modules/Accounting',
+    'description': '''
+Prodide a new field on the invoice line form, allowing to manage
+the lines order.
+    ''',
+    'author': 'Camptocamp',
+    'website': 'http://www.camptocamp.com',
+    'depends': ['account', 'base'],
+    'data': ['invoice_view.xml'],
+    'installable': True,
+    'auto_install': False,
+}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added directory 'invoice_sequence/i18n'
=== added file 'invoice_sequence/i18n/fr.po'
--- invoice_sequence/i18n/fr.po	1970-01-01 00:00:00 +0000
+++ invoice_sequence/i18n/fr.po	2013-10-08 07:58:32 +0000
@@ -0,0 +1,22 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* invoice_sequence
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 5.0.6\n"
+"Report-Msgid-Bugs-To: support@xxxxxxxxxxx\n"
+"POT-Creation-Date: 2009-11-26 08:01:40+0000\n"
+"PO-Revision-Date: 2009-11-26 08:01:40+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: invoice_sequence
+#: field:account.invoice.line,sequence:0
+msgid "Sequence"
+msgstr "Séquence"
+

=== added file 'invoice_sequence/invoice.py'
--- invoice_sequence/invoice.py	1970-01-01 00:00:00 +0000
+++ invoice_sequence/invoice.py	2013-10-08 07:58:32 +0000
@@ -0,0 +1,33 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Author Tiny SPRL 2004-2009
+#    Author Vincent Renaville Copyright 2009-2013 Camptocamp SA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program 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 Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from openerp.osv import orm, fields
+
+
+class account_invoice_line(orm.Model):
+    _inherit = 'account.invoice.line'
+    _order = 'sequence'
+    _columns = {
+        'sequence': fields.integer('Sequence'),
+    }
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'invoice_sequence/invoice_view.xml'
--- invoice_sequence/invoice_view.xml	1970-01-01 00:00:00 +0000
+++ invoice_sequence/invoice_view.xml	2013-10-08 07:58:32 +0000
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+	<data>
+
+		<record model="ir.ui.view" id="view_invoice_line_form">
+			<field name="name">Invoice Line</field>
+			<field name="model">account.invoice.line</field>
+			<field name="inherit_id" ref="account.view_invoice_line_form"/>
+			<field name="arch" type="xml">
+				<field name="invoice_line_tax_id" position="after">
+					<field name="sequence" />
+				</field>
+			</field>
+		</record>
+
+		<record id="invoice_supplier_form" model="ir.ui.view">
+            <field name="name">account.invoice.supplier.form</field>
+            <field name="model">account.invoice</field>
+            <field name="inherit_id" ref="account.invoice_supplier_form" />
+            <field name="priority">2</field>
+            <field name="arch" type="xml">
+                <xpath expr="/form/sheet/notebook/page[@string='Invoice']/field[@name='invoice_line']/tree[@string='Invoice lines']/field[@name='product_id']" position="before">
+                    <field name="sequence"/>
+                </xpath>
+            </field>
+        </record>
+
+        <record id="invoice_form" model="ir.ui.view">
+            <field name="name">account.invoice.supplier.form</field>
+            <field name="model">account.invoice</field>
+            <field name="inherit_id" ref="account.invoice_form" />
+            <field name="priority">2</field>
+            <field name="arch" type="xml">
+                <xpath expr="/form/sheet/notebook/page[@string='Invoice Lines']/field[@name='invoice_line']/tree[@string='Invoice Lines']/field[@name='product_id']" position="before">
+                    <field name="sequence"/>
+                </xpath>
+            </field>
+        </record>
+
+	</data>
+</openerp>
\ No newline at end of file


Follow ups