← Back to team overview

openerp-india team mailing list archive

[Bug 1091398] [NEW] crash calling move_line_id_payment_get function

 

Public bug reported:

Environment Info:
    openerp 7 (trunk)
    addons   revno 8369
    server    revno 4699
    web        revno 3625

I was making some test in the module fiscal requirements for the
Venezuelan localization when I observe some problems in the definition
of a function in account.invoice at openerp-addons.

When I try to call the fuction move_line_id_payment_get() i get this
error message:

    File "/home/openerp/bzr_projects/ovl70-fr-rev-kty/l10n_ve_fiscal_requirements/wizard/account_invoice_refund.py", line 355, in unreconcile_paid_invoices
        movelineids = inv.move_line_id_payment_get(cr, uid, inv.id)
    File "/home/openerp/instancias/estable/7.0/server/openerp/osv/orm.py", line 374, in function_proxy
        return attr(self._cr, self._uid, [self._id], *args, **kwargs)
    TypeError: move_line_id_payment_get() got an unexpected keyword argument 'context'

That's because the function_proxy() method return this 
   return attr(self._cr, self._uid, [self._id], *args, **kwargs)

but move_line_id_payment_get receives only (self, cr, uid, ids, *args) without  **kwargs argument.
The move_line_id_payment_get() function lack an argument to be compatible with osv.

    The current definition is:
        def move_line_id_payment_get(self, cr, uid, ids, *args):

    But it needs to be change to:
        def move_line_id_payment_get(self, cr, uid, ids, *args, **kwargs):

Making this change the error message disappears and
move_line_id_payment_get() is correctly called.

** Affects: openobject-addons
     Importance: Undecided
         Status: New

** Patch added: "account_invoice.py.patch"
   https://bugs.launchpad.net/bugs/1091398/+attachment/3462374/+files/account_invoice.py.patch

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1091398

Title:
  crash calling move_line_id_payment_get function

Status in OpenERP Addons (modules):
  New

Bug description:
  Environment Info:
      openerp 7 (trunk)
      addons   revno 8369
      server    revno 4699
      web        revno 3625

  I was making some test in the module fiscal requirements for the
  Venezuelan localization when I observe some problems in the definition
  of a function in account.invoice at openerp-addons.

  When I try to call the fuction move_line_id_payment_get() i get this
  error message:

      File "/home/openerp/bzr_projects/ovl70-fr-rev-kty/l10n_ve_fiscal_requirements/wizard/account_invoice_refund.py", line 355, in unreconcile_paid_invoices
          movelineids = inv.move_line_id_payment_get(cr, uid, inv.id)
      File "/home/openerp/instancias/estable/7.0/server/openerp/osv/orm.py", line 374, in function_proxy
          return attr(self._cr, self._uid, [self._id], *args, **kwargs)
      TypeError: move_line_id_payment_get() got an unexpected keyword argument 'context'

  That's because the function_proxy() method return this 
     return attr(self._cr, self._uid, [self._id], *args, **kwargs)

  but move_line_id_payment_get receives only (self, cr, uid, ids, *args) without  **kwargs argument.
  The move_line_id_payment_get() function lack an argument to be compatible with osv.

      The current definition is:
          def move_line_id_payment_get(self, cr, uid, ids, *args):

      But it needs to be change to:
          def move_line_id_payment_get(self, cr, uid, ids, *args, **kwargs):

  Making this change the error message disappears and
  move_line_id_payment_get() is correctly called.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1091398/+subscriptions


Follow ups

References