← Back to team overview

openerp-india team mailing list archive

Re: [Bug 925345] [NEW] Problem on pricelist when price computation based on "partner section on the product form"

 

Le 02/02/2012 10:19, Antoine(OpenERP) a écrit :
> Public bug reported:
>
> 1) Use demo data
> 2) Assign a supplier for a specific product, add some pricelists for this specific supplier
> 3) Create a new pricelist based on "Partner section of the product form" and make some price computation
> 4) Create a sale order, apply the pricelist and select the product on which you added some supplier info in step2
> 5) Error: No valid pricelist line found ! :Couldn't find a pricelist line matching this product and quantity.
> You have to change either the product, the quantity or the pricelist.
>
> 6) If you try to modify the pricelist after that (I try to add a name to
> the rule I've created):
>
>
> Client Traceback (most recent call last):
>   File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/addons/web/common/http.py", line 180, in dispatch
>     response["result"] = method(controller, self, **self.params)
>   File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/addons/web/controllers/main.py", line 830, in save
>     r = m.write([id], data, req.session.eval_context(req.context))
>   File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/addons/web/common/openerplib/main.py", line 250, in proxy
>     args, kw)
>   File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/addons/web/common/openerplib/main.py", line 117, in proxy
>     result = self.connector.send(self.service_name, method, *args)
>   File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/addons/web/common/http.py", line 609, in send
>     raise fault
>
>
> Server Traceback (most recent call last):
>   File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/addons/web/common/http.py", line 590, in send
>     result = openerp.netsvc.dispatch_rpc(service_name, method, args)
>   File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/netsvc.py", line 324, in dispatch_rpc
>     result = ExportService.getService(service_name).dispatch(method, params)
>   File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/service/web_services.py", line 591, in dispatch
>     res = fn(db, uid, *params)
>   File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/osv/osv.py", line 166, in execute_kw
>     return self.execute(db, uid, obj, method, *args, **kw or {})
>   File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/osv/osv.py", line 120, in wrapper
>     return f(self, dbname, *args, **kwargs)
>   File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/osv/osv.py", line 175, in execute
>     res = self.execute_cr(cr, uid, obj, method, *args, **kw)
>   File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/addons/audittrail/audittrail.py", line 495, in execute_cr
>     return fct_src(cr, uid, model, method, *args)
>   File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/osv/osv.py", line 163, in execute_cr
>     return getattr(object, method)(cr, uid, *args, **kw)
>   File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/osv/orm.py", line 3920, in write
>     result += self._columns[field].set(cr, self, id, field, vals[field], user, context=rel_context) or []
>   File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/osv/fields.py", line 496, in set
>     obj.write(cr, user, [act[1]], act[2], context=context)
>   File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/osv/orm.py", line 3920, in write
>     result += self._columns[field].set(cr, self, id, field, vals[field], user, context=rel_context) or []
>   File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/osv/fields.py", line 496, in set
>     obj.write(cr, user, [act[1]], act[2], context=context)
>   File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/osv/orm.py", line 3892, in write
>     'where id IN %s', upd1 + [sub_ids])
>   File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/sql_db.py", line 152, in wrapper
>     return f(self, *args, **kwargs)
>   File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/sql_db.py", line 214, in execute
>     res = self._obj.execute(query, params)
> DataError: invalid input syntax for integer: "All products"
> LINE 1: ..."base"=E'-2',"min_quantity"=0,"categ_id"=ARRAY[1, E'All prod...
>                                                              ^
>
>
> More or less the same bug under 6.0.3. No error but the price computation is false.
>
> ** Affects: openobject-addons
>      Importance: Undecided
>          Status: New
>

Hello Antoine,

I don't understand why you create a sale pricelist with 'Partner section
in product form' because 'Parten section in product form' is only for
suppliers, so you tried to create a sale pricelist with prices of
suppliers !!

IMHO, the system shouldn't give the option 'Partner section in product
form' for a sale pricelist.

Finally, your choices don't make any sense.

Regards,

-- 
Quentin THEURET
quentin@xxxxxxxxxxx

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

Title:
  Problem on pricelist when price computation based on "partner section
  on the product form"

Status in OpenERP Addons (modules):
  New

Bug description:
  1) Use demo data
  2) Assign a supplier for a specific product, add some pricelists for this specific supplier
  3) Create a new pricelist based on "Partner section of the product form" and make some price computation
  4) Create a sale order, apply the pricelist and select the product on which you added some supplier info in step2
  5) Error: No valid pricelist line found ! :Couldn't find a pricelist line matching this product and quantity.
  You have to change either the product, the quantity or the pricelist.

  6) If you try to modify the pricelist after that (I try to add a name
  to the rule I've created):

  
  Client Traceback (most recent call last):
    File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/addons/web/common/http.py", line 180, in dispatch
      response["result"] = method(controller, self, **self.params)
    File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/addons/web/controllers/main.py", line 830, in save
      r = m.write([id], data, req.session.eval_context(req.context))
    File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/addons/web/common/openerplib/main.py", line 250, in proxy
      args, kw)
    File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/addons/web/common/openerplib/main.py", line 117, in proxy
      result = self.connector.send(self.service_name, method, *args)
    File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/addons/web/common/http.py", line 609, in send
      raise fault

  
  Server Traceback (most recent call last):
    File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/addons/web/common/http.py", line 590, in send
      result = openerp.netsvc.dispatch_rpc(service_name, method, args)
    File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/netsvc.py", line 324, in dispatch_rpc
      result = ExportService.getService(service_name).dispatch(method, params)
    File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/service/web_services.py", line 591, in dispatch
      res = fn(db, uid, *params)
    File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/osv/osv.py", line 166, in execute_kw
      return self.execute(db, uid, obj, method, *args, **kw or {})
    File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/osv/osv.py", line 120, in wrapper
      return f(self, dbname, *args, **kwargs)
    File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/osv/osv.py", line 175, in execute
      res = self.execute_cr(cr, uid, obj, method, *args, **kw)
    File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/addons/audittrail/audittrail.py", line 495, in execute_cr
      return fct_src(cr, uid, model, method, *args)
    File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/osv/osv.py", line 163, in execute_cr
      return getattr(object, method)(cr, uid, *args, **kw)
    File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/osv/orm.py", line 3920, in write
      result += self._columns[field].set(cr, self, id, field, vals[field], user, context=rel_context) or []
    File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/osv/fields.py", line 496, in set
      obj.write(cr, user, [act[1]], act[2], context=context)
    File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/osv/orm.py", line 3920, in write
      result += self._columns[field].set(cr, self, id, field, vals[field], user, context=rel_context) or []
    File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/osv/fields.py", line 496, in set
      obj.write(cr, user, [act[1]], act[2], context=context)
    File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/osv/orm.py", line 3892, in write
      'where id IN %s', upd1 + [sub_ids])
    File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/sql_db.py", line 152, in wrapper
      return f(self, *args, **kwargs)
    File "/home/odoo/runbot/static/openerp-dev-trunk-1276/server/openerp/sql_db.py", line 214, in execute
      res = self._obj.execute(query, params)
  DataError: invalid input syntax for integer: "All products"
  LINE 1: ..."base"=E'-2',"min_quantity"=0,"categ_id"=ARRAY[1, E'All prod...
                                                               ^

  
  More or less the same bug under 6.0.3. No error but the price computation is false.

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


References