コンテンツへスキップ
メニュー
この質問にフラグが付けられました

I am trying to create a payment method where no payment is required. Customer will pay on delivery. So, I need to confirm sales when pay now is created. I have written following codes -


class payment_acquirer_extend(osv.Model):
    _inherit = 'payment.acquirer'
    def _get_providers(self, cr, uid, context=None):
        providers = super(payment_acquirer_extend, self)._get_providers(cr, uid, context=context)
providers.append(['cash', _('Cash on Delivery')])
 return providers
    def transfer_get_form_action_url(self, cr, uid, id, context=None):
        return '/payment/transfer/feedback'
    def create(self, cr, uid, values, context=None):
        if values.get('provider') == 'cash' and not values.get('post_msg'):
            values['post_msg'] = 'CASH DELIVERY'
return super(payment_acquirer_extend, self).create(cr, uid, values, context=context)


Now I understand I have to write following function:

cash_form_generate_values

How to do that and if I click on pay now button it doesn't work?


アバター
破棄
関連投稿 返信 ビュー 活動
2
10月 23
2348
0
2月 22
2336
1
2月 22
2410
0
7月 21
2497
0
6月 21
2229