openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #21883
[Bug 1102368] Re: [7.0] Negative quantity on Sale order gives a traceback
In fact, once the traceback box is closed, it's possible to finish the
flow. So we just have to correct that (ignore "solutions" of preceding
comment)
--
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/1102368
Title:
[7.0] Negative quantity on Sale order gives a traceback
Status in OpenERP Addons (modules):
New
Bug description:
Log in a DB on runbot (all modules)
Create a SO
Enter a SO line with a -1 qty:
Client Traceback (most recent call last):
File "/home/odoo/runbot/static/openerp-dev-7-0-2035/server/openerp/addons/web/http.py", line 195, in dispatch
response["result"] = method(self, **self.params)
File "/home/odoo/runbot/static/openerp-dev-7-0-2035/server/openerp/addons/web/controllers/main.py", line 1078, in call_kw
return self._call_kw(req, model, method, args, kwargs)
File "/home/odoo/runbot/static/openerp-dev-7-0-2035/server/openerp/addons/web/controllers/main.py", line 1070, in _call_kw
return getattr(req.session.model(model), method)(*args, **kwargs)
File "/home/odoo/runbot/static/openerp-dev-7-0-2035/server/openerp/addons/web/session.py", line 43, in proxy
result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)
File "/home/odoo/runbot/static/openerp-dev-7-0-2035/server/openerp/addons/web/session.py", line 31, in proxy_method
result = self.session.send(self.service_name, method, *args)
File "/home/odoo/runbot/static/openerp-dev-7-0-2035/server/openerp/addons/web/session.py", line 104, in send
raise xmlrpclib.Fault(openerp.tools.exception_to_unicode(e), formatted_info)
Server Traceback (most recent call last):
File "/home/odoo/runbot/static/openerp-dev-7-0-2035/server/openerp/addons/web/session.py", line 90, in send
return openerp.netsvc.dispatch_rpc(service_name, method, args)
File "/home/odoo/runbot/static/openerp-dev-7-0-2035/server/openerp/netsvc.py", line 289, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "/home/odoo/runbot/static/openerp-dev-7-0-2035/server/openerp/service/web_services.py", line 614, in dispatch
res = fn(db, uid, *params)
File "/home/odoo/runbot/static/openerp-dev-7-0-2035/server/openerp/osv/osv.py", line 169, in execute_kw
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/home/odoo/runbot/static/openerp-dev-7-0-2035/server/openerp/osv/osv.py", line 123, in wrapper
return f(self, dbname, *args, **kwargs)
File "/home/odoo/runbot/static/openerp-dev-7-0-2035/server/openerp/osv/osv.py", line 179, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/odoo/runbot/static/openerp-dev-7-0-2035/server/openerp/addons/audittrail/audittrail.py", line 514, in execute_cr
return fct_src(cr, uid, model, method, *args, **kw)
File "/home/odoo/runbot/static/openerp-dev-7-0-2035/server/openerp/osv/osv.py", line 166, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/home/odoo/runbot/static/openerp-dev-7-0-2035/server/openerp/addons/warning/warning.py", line 274, in product_id_change
lang, update_tax, date_order, packaging, fiscal_position, flag, context=context)
File "/home/odoo/runbot/static/openerp-dev-7-0-2035/server/openerp/addons/product_visible_discount/product_visible_discount.py", line 71, in product_id_change
lang, update_tax, date_order, packaging=packaging, fiscal_position=fiscal_position, flag=flag, context=context)
File "/home/odoo/runbot/static/openerp-dev-7-0-2035/server/openerp/addons/event_sale/event_sale.py", line 63, in product_id_change
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, context=context)
File "/home/odoo/runbot/static/openerp-dev-7-0-2035/server/openerp/addons/sale_stock/sale_stock.py", line 563, in product_id_change
lang=lang, update_tax=update_tax, date_order=date_order, packaging=packaging, fiscal_position=fiscal_position, flag=flag, context=context)
File "/home/odoo/runbot/static/openerp-dev-7-0-2035/server/openerp/addons/sale_margin/sale_margin.py", line 31, in product_id_change
lang=lang, update_tax=update_tax, date_order=date_order, packaging=packaging, fiscal_position=fiscal_position, flag=flag, context=context)
File "/home/odoo/runbot/static/openerp-dev-7-0-2035/server/openerp/addons/sale/sale.py", line 956, in product_id_change
warning_msgs += _("No valid pricelist line found ! :") + warn_msg +"\n\n"
TypeError: unsupported operand type(s) for +=: 'dict' and 'unicode'
Solutions:
1. Display a friendly message on negative input (easy)
2. Imagine we can have a -1 qty and manage that as a returned product (too complicated and managed by the return product button)
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1102368/+subscriptions
References