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.

1

How to add ean13 in invoice report?

By
lima2x
on 3/6/13, 7:40 AM 1,846 views

I would like to add the EAN13 of the product in each line of my invoice report but can't figure out the right code in OpenOffice Report designer. Help would be appriciate. Thank's

Thank you Andreas for your answer but it's not working. I am using "Invoice with layout".

lima2x
on 3/6/13, 9:39 AM

Please check the logfile whether there are any errors or warnings

Andreas Brueckl
on 3/6/13, 9:43 AM

Which OpenERP Version do you use?

Andreas Brueckl
on 3/6/13, 10:15 AM

version 6.0.3

lima2x
on 3/6/13, 10:22 AM

I have updated my answer

Andreas Brueckl
on 3/6/13, 10:53 AM
1

Andreas Brueckl

--Andreas Brueckl--
5056
| 7 8 7
Vienna, Austria
--Andreas Brueckl--
OpenERP Consulting and Development
Andreas Brueckl
On 3/6/13, 7:45 AM

For report account.invoice use the following term:

[[ l.product_id and l.product_id.ean13 ]]

For account.invoice.layout of v6.0 this is more complex. You have to:

  • Update file account_invoice_layout/report/report_account_invoice_layout.py and include a new field

    res['ean13'] = entry.product_id.ean13

  • Update report and add

    [[ a['ean13'] ]]

I can't make it work in account.invoice.layout ? But it's fine in account.invoice. Thank you for your help.

lima2x
on 3/14/13, 1:40 PM
0
lima2x
On 3/6/13, 10:16 AM

I get this in my server logfile, but i believe it is not related to the ean term :

[2013-03-06 15:11:17,495][ravensara] WARNING:report:rml_except: " o.payment_ter$ Traceback (most recent call last): File "/opt/openerp/server/bin/report/render/rml2pdf/utils.py", line 90, in _c$ eval(n.get('rml_except'), {}, self.localcontext) File "/opt/openerp/server/bin/tools/safe_eval.py", line 284, in safe_eval return eval(test_expr(expr,_SAFE_OPCODES, mode=mode), globals_dict, locals_$ File "/opt/openerp/server/bin/tools/safe_eval.py", line 105, in test_expr code_obj = compile(expr, "", mode) File "<string>", line 1 o.payment_term and o.payment_term.name ]] : [[ (o.payment_term and o.payme$ ^ SyntaxError: invalid syntax

I have solved this warning, it wasn't related to my ean13 issue

lima2x
on 3/6/13, 10:24 AM

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: 3/6/13, 7:40 AM
Seen: 1846 times
Last updated: 3/16/15, 8:10 AM