[FIX]account_invoice:add measing feature reorder lines
authorPinakin Nayi (OpenERP) <pna@tinyerp.com>
Tue, 2 Apr 2013 08:37:30 +0000 (14:07 +0530)
committerPinakin Nayi (OpenERP) <pna@tinyerp.com>
Tue, 2 Apr 2013 08:37:30 +0000 (14:07 +0530)
bzr revid: pna@tinyerp.com-20130402083730-qukgx3918bkhrtig

addons/account/account_invoice.py
addons/account/account_invoice_view.xml

index b470524..6835839 100644 (file)
@@ -1404,7 +1404,7 @@ class account_invoice_line(osv.osv):
         else:
             prop = self.pool.get('ir.property').get(cr, uid, 'property_account_expense_categ', 'product.category', context=context)
         return prop and prop.id or False
-
+    _order = 'sequence'
     _defaults = {
         'quantity': 1,
         'discount': 0.0,
index 8c7cec6..2a00e12 100644 (file)
                         <page string="Invoice">
                             <field context="{'partner_id': partner_id, 'price_type': context.get('price_type') or False, 'type': type}" name="invoice_line">
                                 <tree string="Invoice lines" editable="bottom">
+                                    <field name="sequence" widget="handle"/>
                                     <field name="product_id"
                                         on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, context, parent.company_id)"/>
                                     <field name="name"/>
                         <page string="Invoice Lines">
                             <field name="invoice_line" nolabel="1" widget="one2many_list" context="{'type': type}">
                                 <tree string="Invoice Lines" editable="bottom">
+                                    <field name="sequence" widget="handle"/>
                                     <field name="product_id"
                                         on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, context, parent.company_id)"/>
                                     <field name="name"/>