← Back to team overview

openerp-india team mailing list archive

[Bug 960308] Re: purchase_order_line.onchange_product_id crashes calling fields.date.context_today

 

** Changed in: openobject-addons
       Status: Fix Committed => Fix Released

-- 
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/960308

Title:
  purchase_order_line.onchange_product_id crashes calling
  fields.date.context_today

Status in OpenERP Addons (modules):
  Fix Released

Bug description:
  In Version 6.1.1 calling onchange_product_id with the minimum
  parameters possible (leaving all the defaults blank) causes the method
  to try to fill in date_order.

          if not date_order:
              date_order = fields.date.context_today(cr,uid,context=context)

  This then crashes because it appears to be passing the wrong number of
  arguments.

  2012-03-20 15:08:24,955 16563 ERROR ? openerp.osv.osv: Uncaught exception
  Traceback (most recent call last):
    File "/usr/lib/pymodules/python2.6/openerp/osv/osv.py", line 121, in wrapper
      return f(self, dbname, *args, **kwargs)
    File "/usr/lib/pymodules/python2.6/openerp/osv/osv.py", line 176, in execute
      res = self.execute_cr(cr, uid, obj, method, *args, **kw)
    File "/usr/lib/pymodules/python2.6/openerp/osv/osv.py", line 164, in execute_cr
      return getattr(object, method)(cr, uid, *args, **kw)
    File "/usr/lib/pymodules/python2.6/openerp/addons/purchase/purchase.py", line 776, in onchange_product_id
      date_order = fields.date.context_today(cr,uid,context=context)
  TypeError: context_today() takes at least 3 non-keyword arguments (2 given)
  2012-03-20 15:08:25,148 16563 ERROR ? openerp.netsvc: context_today() takes at least 3 non-keyword arguments (2 given)

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


References