~camptocamp/openobject-addons/extra-6.0-c2c-official

« back to all changes in this revision

Viewing changes to base_sale_multichannels/sale.py

  • Committer: Raphaël Valyi
  • Date: 2011-01-19 03:29:20 UTC
  • Revision ID: rvalyi@gmail.com-20110119032920-1j6au0s2w6lmodt6
[FIX] revert commit : base_sale_multichannels: payments types are 'payment' and not 'receipt' (I'm not sure if it had any impact though) -> back to receipt again as this is what is expect, sorry!

Show diffs side-by-side

added added

removed removed

Lines of Context:
296
296
    def generate_payment_with_journal(self, cr, uid, journal_id, partner_id, amount, payment_ref, entry_name, date, should_validate, context):
297
297
        voucher_obj = self.pool.get('account.voucher')
298
298
        voucher_line_obj = self.pool.get('account.voucher.line')
299
 
        data = voucher_obj.onchange_partner_id(cr, uid, [], partner_id, journal_id, int(amount), False, 'payment', date, context)['value']
 
299
        data = voucher_obj.onchange_partner_id(cr, uid, [], partner_id, journal_id, int(amount), False, 'receipt', date, context)['value']
300
300
        account_id = data['account_id']
301
301
        currency_id = data['currency_id']
302
302
        statement_vals = {
306
306
                            'date' : date,
307
307
                            'partner_id': partner_id,
308
308
                            'account_id': account_id,
309
 
                            'type': 'payment',
 
309
                            'type': 'receipt',
310
310
                            'currency_id': currency_id,
311
311
                        }
312
312
        statement_id = voucher_obj.create(cr, uid, statement_vals, context)
313
 
        context.update({'type': 'payment', 'partner_id': partner_id, 'journal_id': journal_id, 'default_type': 'cr'})
 
313
        context.update({'type': 'receipt', 'partner_id': partner_id, 'journal_id': journal_id, 'default_type': 'cr'})
314
314
        line_account_id = voucher_line_obj.default_get(cr, uid, ['account_id'], context)['account_id']
315
315
        statement_line_vals = {
316
316
                                'voucher_id': statement_id,