Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

KeyError: 'picking_id' in product_bundle module when I try to "confirm sale"

By
dfor mer
on 12/19/13, 12:21 PM 2,280 views

I desparately need to issue a sales order and invoice a client and I keep getting this error:

Client Traceback (most recent call last):

File "/Users/imac/Desktop/openerp/openerp/addons/web/http.py", line 204, in dispatch response["result"] = method(self, *self.params) File "/Users/imac/Desktop/openerp/openerp/addons/web/controllers/main.py", line 1132, in call_button action = self._call_kw(req, model, method, args, {}) File "/Users/imac/Desktop/openerp/openerp/addons/web/controllers/main.py", line 1120, in _call_kw return getattr(req.session.model(model), method)(args, **kwargs) File "/Users/imac/Desktop/openerp/openerp/addons/web/session.py", line 42, in proxy result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw) File "/Users/imac/Desktop/openerp/openerp/addons/web/session.py", line 30, in proxy_method result = self.session.send(self.service_name, method, *args) File "/Users/imac/Desktop/openerp/openerp/addons/web/session.py", line 103, in send raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)

Server Traceback (most recent call last): File "/Users/imac/Desktop/openerp/openerp/addons/web/session.py", line 89, in send return openerp.netsvc.dispatch_rpc(service_name, method, args) File "/Users/imac/Desktop/openerp/openerp/netsvc.py", line 292, in dispatch_rpc result = ExportService.getService(service_name).dispatch(method, params) File "/Users/imac/Desktop/openerp/openerp/service/web_services.py", line 626, in dispatch res = fn(db, uid, params) File "/Users/imac/Desktop/openerp/openerp/osv/osv.py", line 188, in execute_kw return self.execute(db, uid, obj, method, *args, *kw or {}) File "/Users/imac/Desktop/openerp/openerp/osv/osv.py", line 131, in wrapper return f(self, dbname, args, *kwargs) File "/Users/imac/Desktop/openerp/openerp/osv/osv.py", line 197, in execute res = self.execute_cr(cr, uid, obj, method, args, *kw) File "/Users/imac/Desktop/openerp/openerp/osv/osv.py", line 185, in execute_cr return getattr(object, method)(cr, uid, args, *kw) File "/Users/imac/Desktop/openerp/openerp/addons/portal_sale/portal_sale.py", line 64, in action_button_confirm return super(sale_order, self).action_button_confirm(cr, uid, ids, context=context) File "/Users/imac/Desktop/openerp/openerp/addons/sale/sale.py", line 577, in action_button_confirm wf_service.trg_validate(uid, 'sale.order', ids[0], 'order_confirm', cr) File "/Users/imac/Desktop/openerp/openerp/workflow/wkf_service.py", line 119, in trg_validate res2 = instance.validate(cr, id, ident, signal) File "/Users/imac/Desktop/openerp/openerp/workflow/instance.py", line 43, in validate workitem.process(cr, witem, ident, signal, force_running, stack=stack) File "/Users/imac/Desktop/openerp/openerp/workflow/workitem.py", line 60, in process ok = _split_test(cr, workitem, activity['split_mode'], ident, signal, stack) File "/Users/imac/Desktop/openerp/openerp/workflow/workitem.py", line 175, in _split_test _join_test(cr, t[0], t[1], ident, stack) File "/Users/imac/Desktop/openerp/openerp/workflow/workitem.py", line 183, in _join_test create(cr,[activity], inst_id, ident, stack) File "/Users/imac/Desktop/openerp/openerp/workflow/workitem.py", line 40, in create process(cr, res, ident, stack=stack) File "/Users/imac/Desktop/openerp/openerp/workflow/workitem.py", line 60, in process ok = _split_test(cr, workitem, activity['split_mode'], ident, signal, stack) File "/Users/imac/Desktop/openerp/openerp/workflow/workitem.py", line 175, in _split_test _join_test(cr, t[0], t[1], ident, stack) File "/Users/imac/Desktop/openerp/openerp/workflow/workitem.py", line 183, in _join_test create(cr,[activity], inst_id, ident, stack) File "/Users/imac/Desktop/openerp/openerp/workflow/workitem.py", line 40, in create process(cr, res, ident, stack=stack) File "/Users/imac/Desktop/openerp/openerp/workflow/workitem.py", line 60, in process ok = _split_test(cr, workitem, activity['split_mode'], ident, signal, stack) File "/Users/imac/Desktop/openerp/openerp/workflow/workitem.py", line 175, in _split_test _join_test(cr, t[0], t[1], ident, stack) File "/Users/imac/Desktop/openerp/openerp/workflow/workitem.py", line 183, in _join_test create(cr,[activity], inst_id, ident, stack) File "/Users/imac/Desktop/openerp/openerp/workflow/workitem.py", line 40, in create process(cr, res, ident, stack=stack) File "/Users/imac/Desktop/openerp/openerp/workflow/workitem.py", line 52, in process result = _execute(cr, workitem, activity, ident, stack) File "/Users/imac/Desktop/openerp/openerp/workflow/workitem.py", line 106, in _execute returned_action = wkf_expr.execute(cr, ident, workitem, activity) File "/Users/imac/Desktop/openerp/openerp/workflow/wkf_expr.py", line 67, in execute return _eval_expr(cr, ident, workitem, activity['action']) File "/Users/imac/Desktop/openerp/openerp/workflow/wkf_expr.py", line 57, in _eval_expr ret = eval(line, env, nocopy=True) File "/Users/imac/Desktop/openerp/openerp/tools/safe_eval.py", line 241, in safe_eval return eval(test_expr(expr, _SAFE_OPCODES, mode=mode), globals_dict, locals_dict) File "", line 1, in <module> File "/Users/imac/Desktop/openerp/openerp/osv/orm.py", line 374, in function_proxy return attr(self._cr, self._uid, [self._id], args, *kwargs) File "/Users/imac/Desktop/openerp/openerp/addons/product_bundle/sale.py", line 187, in action_ship_create self._create_pickings_and_procurements(cr, uid, order, order.order_line, None, context=context) File "/Users/imac/Desktop/openerp/openerp/addons/product_bundle/sale.py", line 149, in _create_pickings_and_procurements del line_vals['picking_id'] KeyError: 'picking_id'

If anyone could help me out that would be great.

Thanks

3

Serpent Consulting Services Pvt. Ltd.

--Serpent Consulting Services Pvt. Ltd.--
4341
| 6 6 8
Gandhinagar, India
--Serpent Consulting Services Pvt. Ltd.--

Serpent Consulting Services Pvt. Ltd. Your Odoo/OpenERP Solution, just an email away!

Serpent Consulting Services Pvt. Ltd.
On 6/17/14, 9:04 AM

There are three types of products:

    1) Stockable Product

    2) Consumable Product

    3) Service Product.

                     Pickings are created for stockable and consumable products. So system doesn't create pickings for service type of products.

So if you have service type of product in your sale order and you confirm it, system doesn't create picking while in the given module (product_bundle) tries to remove the `picking_id` from dictionary.

To overcode from this error, you have to make following changes in product_bundle/sale.py file:

Go to line number 148 and replace `del line_vals['picking_id']` by `line_vals.pop('picking_id', False)`

Thanks & regards.

Serpent Consulting Services Pvt. Ltd.

 

 

 
 

thanks it's working now

Atul Kumar jain
on 7/2/14, 9:20 AM
0
Damian P Kuczera
On 6/10/14, 6:31 PM

Same problem here :-( Did anyone solve this please?

I have written to the developers (Elico Corp) but not heard of a fix yet.

0
Achim Sinsel
On 6/16/14, 4:15 AM

Hi, I'm getting the same error with the "picking_id" in "product_bundle\sale.py". But I also get other "picking_id" errors with other addons. For example with the "multicompany_warehouse" addon when I'm trying to change the products quantity. I'm able to change the quantity if I this addon is disabled, however, when this addon is enabled, then the following error (see below) occurs.

It seems to be a general problem with the "picking_id" because it is "false" (doesn't exist) sometimes where a valid "picking_id" is expected.

Does anybody know why it happens, is it an integrity issue in the database, a general error in OpenERP, or are these addons buggy?

Thank you.

================================================================

File "E:\OpenERP 7.0-20140105-002500\Server\server\openerp\addons\stock\wizard\stock_change_product_qty.py", line 108, in change_product_qty
  File "E:\OpenERP 7.0-20140105-002500\Server\server\openerp\addons\stock\stock.py", line 2834, in action_done
  File "E:\OpenERP 7.0-20140105-002500\Server\server\openerp\addons\sale_stock_block_without_payment\stock.py", line 99, in action_done
  File "E:\OpenERP 7.0-20140105-002500\Server\server\openerp\addons\stock\stock.py", line 2427, in action_done
  File "E:\OpenERP 7.0-20140105-002500\Server\server\openerp\addons\multicompany_warehouse\stock.py", line 38, in write
  File "E:\OpenERP 7.0-20140105-002500\Server\server\.\openerp\osv\orm.py", line 497, in __getattr__
  File "E:\OpenERP 7.0-20140105-002500\Server\server\.\openerp\osv\orm.py", line 405, in __getitem__
  File "E:\OpenERP 7.0-20140105-002500\Server\server\.\openerp\osv\orm.py", line 3623, in read
  File "E:\OpenERP 7.0-20140105-002500\Server\server\.\openerp\osv\orm.py", line 3681, in _read_flat
  File "E:\OpenERP 7.0-20140105-002500\Server\server\.\openerp\osv\orm.py", line 3931, in check_access_rule
  File "E:\OpenERP 7.0-20140105-002500\Server\server\.\openerp\sql_db.py", line 161, in wrapper
  File "E:\OpenERP 7.0-20140105-002500\Server\server\.\openerp\sql_db.py", line 226, in execute
ProgrammingError: FEHLER:  Operator existiert nicht: integer = boolean
LINE 1: ...ng.id FROM "stock_picking" WHERE stock_picking.id IN (false)...
================================================================

 

0
Bernard Wilmus
On 7/2/14, 10:22 AM

Hi,

I have been trying to modify the sale.py script by modifying the line 149 as suggested by Serpent Consulting. Without any success...

The only way for me to get rid from this problem was to uninstall the module "product_bundle" for the moment.

As a programmer, I do not understand why this module was affecting a quote that do not contain any bundle product. This make me not confident at all in this module.

Regards,

Bernard

0
Mukesh Babel
On 3/22/14, 12:11 PM

Hi,

I am facing the same problem. Anyone managed to find a solution to this?

Error I am getting (OpenERP Version 7.0-20140221-003045 on Windows Machine):

OpenERP Server Error Client Traceback (most recent call last): File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server\openerp\addons\web\http.py", line 204, in dispatch File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server\openerp\addons\web\controllers\main.py", line 1132, in call_button File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server\openerp\addons\web\controllers\main.py", line 1120, in _call_kw File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server\openerp\addons\web\session.py", line 42, in proxy File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server\openerp\addons\web\session.py", line 30, in proxy_method File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server\openerp\addons\web\session.py", line 103, in send

Server Traceback (most recent call last): File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server\openerp\addons\web\session.py", line 89, in send File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\netsvc.py", line 292, in dispatch_rpc File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\service\web_services.py", line 626, in dispatch File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\osv\osv.py", line 190, in execute_kw File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\osv\osv.py", line 132, in wrapper File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\osv\osv.py", line 199, in execute File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\osv\osv.py", line 187, in execute_cr File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server\openerp\addons\portal_sale\portal_sale.py", line 64, in action_button_confirm File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server\openerp\addons\sale\sale.py", line 579, in action_button_confirm File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\wkf_service.py", line 119, in trg_validate File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\instance.py", line 43, in validate File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\workitem.py", line 60, in process File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\workitem.py", line 175, in _split_test File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\workitem.py", line 183, in _join_test File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\workitem.py", line 40, in create File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\workitem.py", line 60, in process File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\workitem.py", line 175, in _split_test File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\workitem.py", line 183, in _join_test File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\workitem.py", line 40, in create File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\workitem.py", line 60, in process File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\workitem.py", line 175, in _split_test File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\workitem.py", line 183, in _join_test File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\workitem.py", line 40, in create File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\workitem.py", line 52, in process File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\workitem.py", line 106, in _execute File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\wkf_expr.py", line 67, in execute File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\wkf_expr.py", line 57, in _eval_expr File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\tools\safe_eval.py", line 241, in safe_eval File "", line 1, in <module> File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\osv\orm.py", line 377, in function_proxy File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server\openerp\addons\product_bundle\sale.py", line 187, in action_ship_create File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server\openerp\addons\product_bundle\sale.py", line 149, in _create_pickings_and_procurements KeyError: 'picking_id'

Thanks for your time, Mukesh

0
Mukesh Babel
On 3/22/14, 12:09 PM

Hi,

I am facing the same problem. Anyone managed to find a solution to this?

Error I am getting (OpenERP Version 7.0-20140221-003045 on Windows Machine):

OpenERP Server Error Client Traceback (most recent call last): File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server\openerp\addons\web\http.py", line 204, in dispatch File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server\openerp\addons\web\controllers\main.py", line 1132, in call_button File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server\openerp\addons\web\controllers\main.py", line 1120, in _call_kw File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server\openerp\addons\web\session.py", line 42, in proxy File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server\openerp\addons\web\session.py", line 30, in proxy_method File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server\openerp\addons\web\session.py", line 103, in send

Server Traceback (most recent call last): File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server\openerp\addons\web\session.py", line 89, in send File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\netsvc.py", line 292, in dispatch_rpc File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\service\web_services.py", line 626, in dispatch File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\osv\osv.py", line 190, in execute_kw File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\osv\osv.py", line 132, in wrapper File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\osv\osv.py", line 199, in execute File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\osv\osv.py", line 187, in execute_cr File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server\openerp\addons\portal_sale\portal_sale.py", line 64, in action_button_confirm File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server\openerp\addons\sale\sale.py", line 579, in action_button_confirm File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\wkf_service.py", line 119, in trg_validate File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\instance.py", line 43, in validate File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\workitem.py", line 60, in process File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\workitem.py", line 175, in _split_test File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\workitem.py", line 183, in _join_test File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\workitem.py", line 40, in create File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\workitem.py", line 60, in process File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\workitem.py", line 175, in _split_test File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\workitem.py", line 183, in _join_test File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\workitem.py", line 40, in create File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\workitem.py", line 60, in process File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\workitem.py", line 175, in _split_test File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\workitem.py", line 183, in _join_test File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\workitem.py", line 40, in create File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\workitem.py", line 52, in process File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\workitem.py", line 106, in _execute File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\wkf_expr.py", line 67, in execute File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\workflow\wkf_expr.py", line 57, in _eval_expr File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\tools\safe_eval.py", line 241, in safe_eval File "", line 1, in <module> File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server.\openerp\osv\orm.py", line 377, in function_proxy File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server\openerp\addons\product_bundle\sale.py", line 187, in action_ship_create File "C:\Program Files\OpenERP 7.0-20140221-003045\Server\server\openerp\addons\product_bundle\sale.py", line 149, in _create_pickings_and_procurements KeyError: 'picking_id'

Thanks for your time, Mukesh

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 12/19/13, 12:21 PM
Seen: 2280 times
Last updated: 3/16/15, 8:10 AM