[FIX] Account Payment: wizard modify as per payment.type obj removed

[REM] l10n_ch: remove payment.type object data

bzr revid: mra@mra-laptop-20100906110338-8ajnjmtou8wa2mop
This commit is contained in:
Mustufa Rangwala 2010-09-06 16:33:38 +05:30
parent 684f85741d
commit 821343fa42
2 changed files with 19 additions and 28 deletions

View File

@ -30,23 +30,24 @@ class account_payment_make_payment(osv.osv_memory):
If type is manual. just confirm the order.
"""
obj_payment_order = self.pool.get('payment.order')
obj_model = self.pool.get('ir.model.data')
obj_act = self.pool.get('ir.actions.act_window')
order= obj_payment_order.browse(cr, uid, context['active_id'], context)
t = order.mode and order.mode.type.code or 'manual'
if t == 'manual' :
obj_payment_order.set_done(cr,uid,context['active_id'],context)
return {}
gw = obj_payment_order.get_wizard(t)
if not gw:
obj_payment_order.set_done(cr,uid,context['active_id'],context)
return {}
module, wizard= gw
result = obj_model._get_id(cr, uid, module, wizard)
id = obj_model.read(cr, uid, [result], ['res_id'])[0]['res_id']
return obj_act.read(cr, uid, [id])[0]
# obj_model = self.pool.get('ir.model.data')
# obj_act = self.pool.get('ir.actions.act_window')
# order = obj_payment_order.browse(cr, uid, context['active_id'], context)
return obj_payment_order.set_done(cr, uid, context['active_id'], context)
# t = order.mode and order.mode.type.code or 'manual'
# if t == 'manual' :
# obj_payment_order.set_done(cr,uid,context['active_id'],context)
# return {}
#
# gw = obj_payment_order.get_wizard(t)
# if not gw:
# obj_payment_order.set_done(cr,uid,context['active_id'],context)
# return {}
#
# module, wizard= gw
# result = obj_model._get_id(cr, uid, module, wizard)
# id = obj_model.read(cr, uid, [result], ['res_id'])[0]['res_id']
# return obj_act.read(cr, uid, [id])[0]
account_payment_make_payment()

View File

@ -138,15 +138,5 @@
<field name="readonly" eval="False"/>
</record>
<!-- Define a payment type -->
<record model="payment.type" id="payment_type_dta">
<field name="name">DTA</field>
<field name="code">dta</field>
<field name="suitable_bank_types"
eval="[(6,0,[ref('dta_iban'),ref('bvrbank'),ref('bvrpost'),ref('bvbank'),ref('bvpost')])]"/>
</record>
</data>
</openerp>
</openerp>