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
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- ลูกค้าสัมพันธ์
- e-Commerce
- ระบบบัญชี
- สินค้าคงคลัง
- PoS
- Project
- MRP
คำถามนี้ถูกตั้งค่าสถานะ
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 fieldres['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.
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
สนุกกับการพูดคุยนี้ใช่ไหม? เข้าร่วมเลย!
สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!
ลงชื่อRelated Posts | ตอบกลับ | มุมมอง | กิจกรรม | |
---|---|---|---|---|
|
0
พ.ย. 16
|
5158 | ||
|
1
มี.ค. 15
|
3806 | ||
|
0
มี.ค. 15
|
3030 | ||
|
0
ก.ย. 21
|
1952 | ||
ean13 Validation from Product
แก้ไขแล้ว
|
|
1
ก.พ. 16
|
4219 |
Thank you Andreas for your answer but it's not working. I am using "Invoice with layout".
Please check the logfile whether there are any errors or warnings
Which OpenERP Version do you use?
version 6.0.3
I have updated my answer