← Back to team overview

banking-addons-team team mailing list archive

lp:~therp-nl/banking-addons/ba61-company_filter_on_transfer_settings into lp:banking-addons

 

Stefan Rijnhart (Therp) has proposed merging lp:~therp-nl/banking-addons/ba61-company_filter_on_transfer_settings into lp:banking-addons.

Requested reviews:
  Banking Addons Team (banking-addons-team)

For more details, see:
https://code.launchpad.net/~therp-nl/banking-addons/ba61-company_filter_on_transfer_settings/+merge/144083
-- 
https://code.launchpad.net/~therp-nl/banking-addons/ba61-company_filter_on_transfer_settings/+merge/144083
Your team Banking Addons Team is requested to review the proposed merge of lp:~therp-nl/banking-addons/ba61-company_filter_on_transfer_settings into lp:banking-addons.
=== modified file 'account_direct_debit/model/account_payment.py'
--- account_direct_debit/model/account_payment.py	2012-05-01 20:36:44 +0000
+++ account_direct_debit/model/account_payment.py	2013-01-21 11:33:19 +0000
@@ -447,6 +447,7 @@
                 ('account_id.type', '=', 'payable'),
                 ('amount_to_pay', '>', 0)
                 ]
+        domain.append(('company_id', '=', payment.mode.company_id.id))
         # apply payment term filter
         if payment.mode.payment_term_ids:
             domain = domain + [

=== modified file 'account_direct_debit/view/account_payment.xml'
--- account_direct_debit/view/account_payment.xml	2012-04-14 08:58:58 +0000
+++ account_direct_debit/view/account_payment.xml	2013-01-21 11:33:19 +0000
@@ -63,8 +63,14 @@
 	  <field name="type">form</field>
 	  <field name="arch" type="xml">
 	    <field name="type" position="after">
-	      <field name="transfer_account_id"/>
-	      <field name="transfer_journal_id"/>
+	      <field name="transfer_account_id"
+                     domain="[('type', '=', 'other'),
+                              ('reconcile', '=', True),
+                              ('company_id', '=', company_id)]"
+                     />
+	      <field name="transfer_journal_id"
+                     domain="[('company_id', '=', company_id)]"
+                     />
               <field name="payment_term_ids"/>
 	    </field>
 	  </field>


Follow ups