Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I've modified a RML report (account_print_invoice.rml) and it's working great. However, I can print it from the interface because I overwrote the old RML file with my new one.
I'd like to do it rightly, and create a module which includes the new report. I've called the module customized_reports_01. Here is its content:
I've copied the files account_print_invoice.py and and account_report.xml from the original (then in my account_report.xml I've removed all the report records different from the target report), and I've only modified the bold lines:
<?xml version="1.0" encoding="utf-8"?>
attachment="(object.state in ('open','paid')) and ('INV'+(object.number or '').replace('/','')+'.pdf')"
from openerp.report import report_sxw
def __init__(self, cr, uid, name, context):
super(account_invoice, self).__init__(cr, uid, name, context=context)
But when I install my module, I get the next error:
AssertionError: The report "report.account.invoice" already exists!
I've changed the name and tried other ways but I cannot achieve to print my report. I' like to know which is the right way to manage this.
Can anyone help me, please?
About This Community
This platform 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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 1/27/15, 9:57 AM|
|Seen: 1065 times|
|Last updated: 3/16/15, 8:10 AM|