← Back to team overview

account-payment-team team mailing list archive

[Merge] lp:~oihanecruce/account-payment/7.0 into lp:account-payment

 

Oihane Crucelaegui has proposed merging lp:~oihanecruce/account-payment/7.0 into lp:account-payment.

Requested reviews:
  Account Payment (account-payment-team)

For more details, see:
https://code.launchpad.net/~oihanecruce/account-payment/7.0/+merge/157891

nan_account_bank_statement view error solved just added /sheet/ in required lines

BUG 1157608 FIXED - account_payment_extension/wizard/account_payment_order.py line 105 changed 'if amount:' to 'if amount > 0.0:'
-- 
https://code.launchpad.net/~oihanecruce/account-payment/7.0/+merge/157891
Your team Account Payment is requested to review the proposed merge of lp:~oihanecruce/account-payment/7.0 into lp:account-payment.
=== modified file 'account_payment_extension/account_move_line.py' (properties changed: -x to +x)
--- account_payment_extension/account_move_line.py	2012-11-01 21:49:33 +0000
+++ account_payment_extension/account_move_line.py	2013-04-09 15:01:20 +0000
@@ -170,22 +170,29 @@
                 return super(account_move_line, self).write(cr, uid, ids, vals, context, check, update_check)
         return super(account_move_line, self).write(cr, uid, ids, vals, context, check, update_check=False)
 
-    def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False, submenu=False):
-        menus = [
-            self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account_payment_extension', 'menu_action_invoice_payments'),
-            self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account_payment_extension', 'menu_action_done_payments'),
-        ]
-        menus = [m[1] for m in menus]
-        if 'active_id' in context and context['active_id'] in menus:
-            # Use standard views for account.move.line object
-            if view_type == 'search':
-                # Get a specific search view (bug in 6.0RC1, it does not give the search view defined in the action window)
-                view_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account_payment_extension', 'view_payments_filter')[1]
-            result = super(osv.osv, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu)
-        else:
-            # Use special views for account.move.line object (for ex. tree view contains user defined fields)
-            result = super(account_move_line, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu)
-        return result
+
+#the search filter view system changed in v7: you can now search by any field and there is no more select in widget, so further work would be
+# required to port the following logic to v7.
+#
+# In the meantime, as the feature loss isn't that huge and as workarounds are possible we simply commented the following code out.
+
+#    def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False, submenu=False):
+#        menus = [
+#            self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account_payment_extension', 'menu_action_invoice_payments'),
+#            self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account_payment_extension', 'menu_action_done_payments'),
+#        ]
+#
+#        menus = [m[1] for m in menus]
+#        if 1==1: # 'active_id' in context and context['active_id'] in menus:
+#            # Use standard views for account.move.line object
+#            if view_type == 'search':
+#                # Get a specific search view (bug in 6.0RC1, it does not give the search view defined in the action window)
+#                view_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account_payment_extension', 'view_payments_filter')[1]
+#            result = super(osv.osv, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu)
+#        else:
+#            # Use special views for account.move.line object (for ex. tree view contains user defined fields)
+#            result = super(account_move_line, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu)
+#        return result
 
 account_move_line()
 

=== modified file 'account_payment_extension/payment_view.xml'
--- account_payment_extension/payment_view.xml	2012-12-31 10:14:41 +0000
+++ account_payment_extension/payment_view.xml	2013-04-09 15:01:20 +0000
@@ -127,7 +127,6 @@
 
     <menuitem action="action_payment_type" id="menu_action_payment_type" parent="account.menu_configuration_misc"/>
 
-
     <!--
     =======================================================================================================
         PAYMENT MODE
@@ -146,7 +145,6 @@
         </field>
     </record>
 
-
     <!--
     =================================================================================================
          INVOICES
@@ -189,15 +187,24 @@
             </field>
         </field>
     </record>
+<<<<<<< TREE
 
     <!--************ account.move.line extension to show additional fields **********-->
     <!--
     <record model="ir.ui.view" id="payments_move_line_tree">
         <field name="name">account.payments.move.line.tree</field>
+=======
+   
+    <!--************ account.move.line extension to show additional fields ********** -->
+    <record model="ir.ui.view" id="view_move_line_tree_wiz">
+        <field name="name">account.move.line.tree</field>
+>>>>>>> MERGE-SOURCE
         <field name="model">account.move.line</field>
-        <field name="type">tree</field>
-        <field name="inherit_id" ref="account_payment.view_move_line_tree_wiz"/>
+        <field name="inherit_id" ref="account.view_move_line_tree"/>
         <field name="arch" type="xml">
+            <field name="reconcile" position="after">
+                <field name="amount_to_pay"/>
+            </field>
             <field name="currency_id" position="replace">
                 <field name="currency_id" groups="base.group_extended"/>
                 <field name="reconcile_id"/>
@@ -214,17 +221,16 @@
         <field name="type">form</field>
         <field name="inherit_id" ref="account.view_move_line_form"/>
         <field name="arch" type="xml">
-            <separator string="Internal Note" position="before">
-                <group col="2" colspan="2">
-                    <separator colspan="2" string="Payment"/>
+            <field name="narration" position="before">
+        <!--        <group col="2" colspan="2">
+                    <separator colspan="2" string="Payment"/> -->
                     <field name="payment_type" select="1" widget="selection"/>
                     <field name="partner_bank_id" domain="[('partner_id','=',partner_id)]"/>
                     <field name="received_check"/>
-                </group>
-            </separator>
+        <!--        </group> -->
+            </field>
         </field>
     </record>
-	-->
 
     <!--
     ========================================================================================================
@@ -346,7 +352,11 @@
     =========================================================================================
      PAYMENTS
     =========================================================================================
+<<<<<<< TREE
 
+=======
+    -->
+>>>>>>> MERGE-SOURCE
     <record id="view_payments_tree" model="ir.ui.view">
         <field name="name">Payments</field>
         <field name="model">account.move.line</field>
@@ -380,35 +390,33 @@
         <field name="priority" eval="20"/>
         <field name="arch" type="xml">
             <search string="Search Invoice Payments">
-               <group col='10' colspan='4'>
                     <filter icon="terp-sale" string="Receive" domain="[('account_id.type','=','receivable')]" help="Receivable payments"/>
                     <filter icon="terp-purchase" string="Pay" domain="[('account_id.type','=','payable')]" help="Payable payments"/>
-                    <separator orientation="vertical"/>
+                    <separator/>
                     <filter icon="terp-dolar_ok!" string="Unreconciled" domain="[('reconcile_id','=',False)]" help="Unreconciled payments"/>
                     <field name="account_id"/>
                     <field name="partner_id"/>
                     <field name="invoice"/>
                     <field name="date_maturity"/>
-                    <newline/>
+                    <separator/>
                     <field name="amount_to_pay"/>
                     <field name="payment_type" widget="selection"/>
                     <field name="partner_bank_id"/>
                     <field name="received_check"/>
-                </group>
-                <newline/>
-                <group expand="0" string="Group By...">
-                    <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
-                    <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
-                    <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
-                    <separator orientation="vertical"/>
-                    <filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
-                    <filter string="Effective date" icon="terp-go-month" domain="[]" context="{'group_by':'date_maturity'}"/>
-                </group>
-           </search>
+                    <group expand="0" string="Group By...">
+                        <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
+                        <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
+                        <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
+                        <separator/>
+                        <filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
+                        <filter string="Effective date" icon="terp-go-month" domain="[]" context="{'group_by':'date_maturity'}"/>
+                    </group>
+            </search>
         </field>
     </record>
-	-->
-    <!-- Invoice Payments
+
+    <!-- Invoice Payments -->
+
     <record model="ir.actions.act_window" id="action_invoice_payments">
         <field name="name">Invoice payments</field>
         <field name="res_model">account.move.line</field>
@@ -417,9 +425,10 @@
         <field name="search_view_id" ref="view_payments_filter"/>
         <field name="domain">[('account_id.type','in',['receivable','payable']),('invoice','&lt;&gt;',False)]</field>
     </record>
+
     <menuitem name="Invoice payments" parent="account_payment.menu_main_payment" action="action_invoice_payments" id="menu_action_invoice_payments" sequence="4"/>
-	-->
-    <!-- Done Payments
+-
+    <!-- Done Payments -->
     <record model="ir.actions.act_window" id="action_done_payments">
         <field name="name">Done payments</field>
         <field name="res_model">account.move.line</field>
@@ -428,7 +437,8 @@
         <field name="search_view_id" ref="view_payments_filter"/>
         <field name="domain">[('account_id.type','in',['receivable','payable']),('invoice','=',False)]</field>
     </record>
+
     <menuitem name="Done payments" parent="account_payment.menu_main_payment" action="action_done_payments" id="menu_action_done_payments" sequence="5"/>
-	-->
+
 </data>
 </openerp>

=== modified file 'account_payment_extension/wizard/account_payment_order.py'
--- account_payment_extension/wizard/account_payment_order.py	2012-11-01 21:49:33 +0000
+++ account_payment_extension/wizard/account_payment_order.py	2013-04-09 15:01:20 +0000
@@ -102,7 +102,7 @@
         line_ids = line_obj.search(cr, uid, domain, order='date_maturity', context=context)
 
         selected_ids = []
-        if amount:
+        if amount > 0.0:
             if payment.mode and payment.mode.require_bank_account:
                 line2bank = pool.get('account.move.line').line2bank(cr, uid, line_ids, payment.mode.id, context)
             else:

=== modified file 'nan_account_bank_statement/account_statement_view.xml'
--- nan_account_bank_statement/account_statement_view.xml	2012-01-20 10:41:21 +0000
+++ nan_account_bank_statement/account_statement_view.xml	2013-04-09 15:01:20 +0000
@@ -31,7 +31,7 @@
 		<field name="type">form</field>
 		<field name="inherit_id" ref="account.view_bank_statement_form"/>
 		<field name="arch" type="xml">
-			<xpath expr="/form/notebook/page[@name='statement_line_ids']/field[@name='line_ids']/form/field[@name='sequence']" position="after">
+			<xpath expr="/form/sheet/notebook/page[@name='statement_line_ids']/field[@name='line_ids']/form/group/field[@name='sequence']" position="after">
 				<field name="search_by"/>
 				<group colspan="2" col="2">
 					<button name="button_reconcile_search"  string="_Search" type="object" icon="gtk-find" attrs="{'invisible': [('voucher_id','!=',False)]}"/>
@@ -46,7 +46,7 @@
 		<field name="type">form</field>
 		<field name="inherit_id" ref="account.view_bank_statement_form"/>
 		<field name="arch" type="xml">
-			<xpath expr="/form/notebook/page[@name='statement_line_ids']/field[@name='line_ids']/tree/field[@name='amount']" position="after">
+			<xpath expr="/form/sheet/notebook/page[@name='statement_line_ids']/field[@name='line_ids']/tree/field[@name='amount']" position="after">
 				<button name="%(action_statement_line_split_wizard)d" string="Split" type="action" icon="terp-stock_effects-object-colorize"/>
 			</xpath>
 		</field>