← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 809751] Re: [Trunk]Problem in product on_change method in sale_margin

 

Hello Amit Parik,

Thanks for Reporting this issue. i have checked your solution and its
working fine. Following are the Revision ID and Number of the bug :

Revision ID : bde@xxxxxxxxxxx-20110713111231-novysjd1bldn6bv3
Revision Number : 4883

The solution will be merged in addons soon.

Thanks & Regards,
Devnani Bharat R.

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

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/809751

Title:
  [Trunk]Problem in product on_change method in sale_margin

Status in OpenERP Modules (addons):
  Fix Committed

Bug description:
  Steps to reproduce:
  1) Install sale_margin module
  2) Create a SO Open the So line you have faced the following traceback.

  Traceback (most recent call last):
    File "/home/amp/workspace/trunk6/server/openerp/osv/osv.py", line 118, in wrapper
      return f(self, dbname, *args, **kwargs)
    File "/home/amp/workspace/trunk6/server/openerp/osv/osv.py", line 172, in execute
      res = self.execute_cr(cr, uid, obj, method, *args, **kw)
    File "/home/amp/workspace/trunk6/server/openerp/osv/osv.py", line 163, in execute_cr
      return getattr(object, method)(cr, uid, *args, **kw)
  TypeError: product_id_change() takes at most 18 arguments (19 given)

  Solution : the context is missing in product_id_change method is
  sale.order.line object.

  === modified file 'sale_margin/sale_margin.py'
  --- sale_margin/sale_margin.py	2011-07-01 23:41:24 +0000
  +++ sale_margin/sale_margin.py	2011-07-13 07:33:37 +0000
  @@ -25,7 +25,7 @@
   
       def product_id_change(self, cr, uid, ids, pricelist, product, qty=0,
               uom=False, qty_uos=0, uos=False, name='', partner_id=False,
  -            lang=False, update_tax=True, date_order=False, packaging=False, fiscal_position=False, flag=False):
  +            lang=False, update_tax=True, date_order=False, packaging=False, fiscal_position=False, flag=False, context=None):
           res = super(sale_order_line, self).product_id_change(cr, uid, ids, pricelist, product, qty=qty,
               uom=uom, qty_uos=qty_uos, uos=uos, name=name, partner_id=partner_id,
               lang=lang, update_tax=update_tax, date_order=date_order, packaging=packaging, fiscal_position=fiscal_position, flag=flag)

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


References