Divyesh Makwana(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-871960-mdi into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #871960 in OpenERP Addons: "Refund payment not possible from Customer 
Invoices winow"
  https://bugs.launchpad.net/openobject-addons/+bug/871960

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-871960-mdi/+merge/80319

Hello Sir,

I have fix the issue: https://bugs.launchpad.net/openobject-addons/+bug/871960 
"Refund payment not possible from Customer Invoices window".

I changes the fields_view_get() method of 'account.invoice' model and also 
passes the context from
act_window.


Regards,

Divyesh Makwana(MDI)

-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-871960-mdi/+merge/80319
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-871960-mdi.
=== modified file 'account/account_invoice.py'
--- account/account_invoice.py	2011-10-19 08:14:03 +0000
+++ account/account_invoice.py	2011-10-25 10:58:26 +0000
@@ -307,6 +307,10 @@
         res = super(account_invoice,self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=submenu)
 
         type = context.get('journal_type', 'sale')
+        if context.get('search_default_customer', False) and type == 'sale_refund':
+            type = 'sale_refund'
+        else:
+             type = 'purchase_refund'
         for field in res['fields']:
             if field == 'journal_id':
                 journal_select = journal_obj._name_search(cr, uid, '', [('type', '=', type)], context=context, limit=None, name_get_uid=1)

=== modified file 'account/account_invoice_view.xml'
--- account/account_invoice_view.xml	2011-10-19 08:14:03 +0000
+++ account/account_invoice_view.xml	2011-10-25 10:58:26 +0000
@@ -505,7 +505,7 @@
         </record>
         <menuitem action="action_invoice_tree4" id="menu_action_invoice_tree4" parent="menu_finance_payables"/>
 
-        <act_window context="{'search_default_partner_id':[active_id], 'default_partner_id': active_id}" id="act_res_partner_2_account_invoice_opened" name="Invoices" res_model="account.invoice" src_model="res.partner"/>
+        <act_window context="{'search_default_partner_id':[active_id], 'default_partner_id': active_id, 'journal_type': 'sale_refund'}" id="act_res_partner_2_account_invoice_opened" name="Invoices" res_model="account.invoice" src_model="res.partner"/>
 
         <act_window
            id="act_account_journal_2_account_invoice_opened"

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to