account_payment reads non existing fields

Bug #311727 reported by Jordi Esteve (www.zikzakmedia.com)
2
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Undecided
Jay Vora (Serpent Consulting Services)

Bug Description

OpenERP 5.0 RC2, wizard_populate_statement.py in account_payment module reads non existing fields in the payment lines:

ERROR:orm:Programming error: field 'value_date' does not exist in object 'payment.line' !
ERROR:orm:Programming error: field 'reference' does not exist in object 'payment.line' !

Lines 68-85 of wizard_populate_statement.py could be changed by (see also account_payment_extension module in addons-extra that extends account_payment module to process payable and receivable payments):

    for line in line_obj.browse(cursor, user, line_ids, context=context):
        ctx = context.copy()
        ctx['date'] = line.ml_maturity_date
        amount = currency_obj.compute(cursor, user, line.currency.id,
                statement.currency.id, line.amount_currency, context=ctx)
        reconcile_id = statement_reconcile_obj.create(cursor, user, {
            'line_ids': [(6, 0, [line.move_line_id.id])]
            }, context=context)
        statement_line_obj.create(cursor, user, {
            'name': (line.order_id.reference or '?') +'. '+ line.name,
            'amount': - amount,
            'type': 'supplier',
            'partner_id': line.partner_id.id,
            'account_id': line.move_line_id.account_id.id,
            'statement_id': statement.id,
            'ref': line.communication,
            'reconcile_id': reconcile_id,
            }, context=context)

Changed in openobject-addons:
assignee: nobody → jvo-openerp
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Fixed in addons rev 2054

Changed in openobject-addons:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.