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

OpenERP Server Error when creating an invoice

By
Christophe dos Santos
on 5/12/13, 9:53 AM 2,947 views

Hi everybody,

I encounter a litte trouble when I want to create an invoice in OpenERP 7. I have the error below:


OpenERP Server Error

Client Traceback (most recent call last): File "C:\Program Files (x86)\OpenERP 7\Server\server\openerp\addons\web\http.py", line 203, in dispatch File "C:\Program Files (x86)\OpenERP 7\Server\server\openerp\addons\web\controllers\main.py", line 1133, in call_button File "C:\Program Files (x86)\OpenERP 7\Server\server\openerp\addons\web\controllers\main.py", line 1121, in _call_kw File "C:\Program Files (x86)\OpenERP 7\Server\server\openerp\addons\web\session.py", line 43, in proxy File "C:\Program Files (x86)\OpenERP 7\Server\server\openerp\addons\web\session.py", line 31, in proxy_method File "C:\Program Files (x86)\OpenERP 7\Server\server\openerp\addons\web\session.py", line 104, in send

Server Traceback (most recent call last): File "C:\Program Files (x86)\OpenERP 7\Server\server\openerp\addons\web\session.py", line 90, in send File "C:\Program Files (x86)\OpenERP 7\Server\server.\openerp\netsvc.py", line 293, in dispatch_rpc File "C:\Program Files (x86)\OpenERP 7\Server\server.\openerp\service\web_services.py", line 626, in dispatch File "C:\Program Files (x86)\OpenERP 7\Server\server.\openerp\osv\osv.py", line 188, in execute_kw File "C:\Program Files (x86)\OpenERP 7\Server\server.\openerp\osv\osv.py", line 131, in wrapper File "C:\Program Files (x86)\OpenERP 7\Server\server.\openerp\osv\osv.py", line 197, in execute File "C:\Program Files (x86)\OpenERP 7\Server\server.\openerp\osv\osv.py", line 185, in execute_cr File "C:\Program Files (x86)\OpenERP 7\Server\server\openerp\addons\sale\wizard\sale_make_invoice_advance.py", line 170, in create_invoices File "C:\Program Files (x86)\OpenERP 7\Server\server\openerp\addons\sale\sale.py", line 435, in manual_invoice File "C:\Program Files (x86)\OpenERP 7\Server\server.\openerp\workflow\wkf_service.py", line 119, in trg_validate File "C:\Program Files (x86)\OpenERP 7\Server\server.\openerp\workflow\instance.py", line 43, in validate File "C:\Program Files (x86)\OpenERP 7\Server\server.\openerp\workflow\workitem.py", line 60, in process File "C:\Program Files (x86)\OpenERP 7\Server\server.\openerp\workflow\workitem.py", line 175, in _split_test File "C:\Program Files (x86)\OpenERP 7\Server\server.\openerp\workflow\workitem.py", line 183, in _join_test File "C:\Program Files (x86)\OpenERP 7\Server\server.\openerp\workflow\workitem.py", line 40, in create File "C:\Program Files (x86)\OpenERP 7\Server\server.\openerp\workflow\workitem.py", line 52, in process File "C:\Program Files (x86)\OpenERP 7\Server\server.\openerp\workflow\workitem.py", line 127, in _execute File "C:\Program Files (x86)\OpenERP 7\Server\server.\openerp\workflow\wkf_expr.py", line 67, in execute File "C:\Program Files (x86)\OpenERP 7\Server\server.\openerp\workflow\wkf_expr.py", line 57, in _eval_expr File "C:\Program Files (x86)\OpenERP 7\Server\server.\openerp\tools\safe_eval.py", line 241, in safe_eval File "", line 1, in <module> File "C:\Program Files (x86)\OpenERP 7\Server\server.\openerp\osv\orm.py", line 374, in function_proxy File "C:\Program Files (x86)\OpenERP 7\Server\server\openerp\addons\sale_stock\sale_stock.py", line 192, in action_invoice_create File "C:\Program Files (x86)\OpenERP 7\Server\server\openerp\addons\sale\sale.py", line 536, in action_invoice_create File "C:\Program Files (x86)\OpenERP 7\Server\server\openerp\addons\sale\sale.py", line 404, in _make_invoice File "C:\Program Files (x86)\OpenERP 7\Server\server\openerp\addons\mail\mail_thread.py", line 242, in create File "C:\Program Files (x86)\OpenERP 7\Server\server.\openerp\osv\orm.py", line 4478, in create File "C:\Program Files (x86)\OpenERP 7\Server\server.\openerp\osv\orm.py", line 4627, in _store_set_values File "C:\Program Files (x86)\OpenERP 7\Server\server.\openerp\osv\fields.py", line 1131, in get File "C:\Program Files (x86)\OpenERP 7\Server\server.\openerp\osv\fields.py", line 1197, in _fnct_read File "C:\Program Files (x86)\OpenERP 7\Server\server.\openerp\osv\orm.py", line 383, in __getitem__

KeyError: "Field 'commercial_partner_id' does not exist in object 'browse_record(res.partner, 5)'"

Could someone help for solving this error?

I thank you in advance.

2

It's a bug in the Invoice Analysis per Company addon. I uninstalled it and now it's work very well.

Thanks for your attention.

It Works, Thanks!

Fábio Moura
on 7/13/13, 3:27 AM

Thanks, works for me too!

Mohamed Essakali
on 10/21/13, 7:34 PM
1
Farid Ghanchi
On 6/21/13, 8:21 AM

Hello,

This issue is already post over here: bugs.launchpad.net/openobject-addons/+bug/1190158 The solution is fixed in trunk see the method

def _find_accounting_partner(self, partner):
        '''
        Find the partner for which the accounting entries will be created
        '''
        return partner.commercial_partner_id 
Thanks

see the bug: https://bugs.launchpad.net/openobject-addons/+bug/1190158

Farid Ghanchi
on 6/21/13, 8:21 AM
0

patrick

--patrick--
1958
| 5 4 7
Baarn, Netherlands
--patrick--
patrick
On 5/12/13, 12:04 PM

Given the error, it looks like some object expects a field (commercial_partner_id) in the table res.partner.

Have you installed any additional modules (downloaded from internet), or have you made your own module?

Specially in the last case it can happen that you install a module, modify the code and upgrade the module, without restarting the openERP server before reinstalling the module. You have to restart openERP if you modify the python code, in order for openERP to recognize the new code.

Hi Patrick,

Yes, I installed my own module, but when I encountered this error, I uninstalled it and OpenERP too. The error continue. I deleted all the cookies and the same error continue, I don't know what to do.

Regards,

Else IT, Christophe dos Santos
on 5/12/13, 3:15 PM

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

0 follower(s)

Stats

Asked: 5/12/13, 9:53 AM
Seen: 2947 times
Last updated: 3/16/15, 8:10 AM