How can I change the quotation report without changing the rml file in sale module(same question for invoice report)?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
Hi,
it is the same principle that views and fields : overwrite report.
For example i edited a report purchase in my custom module :
1° - create folder my_module/report
2°- copy files .rml and .swx in this folder
3°- create file report/order.py
class order(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(order, self).__init__(cr, uid, name, context=context)
self.localcontext.update({'time': time})
report_sxw.report_sxw('report.purchase.order2','purchase.order','addons/my_module/report/order.rml',parser=order)
4° -create file report/purchase_report.xml
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<report auto="False" id="report_purchase_order" model="purchase.order"
name="purchase.order" rml="my_module/report/order.rml"
usage="default" string="Purchase Order"/>
</data>
</openerp>
you can use openerp interface and not code :
Settings>>Technical>>Reports
and duplicate report then edit this report to openOffice.
Thanks.
your class and/or your report tag doesn't seems to inherit some existing object. Where do you say which report you want to extend/replace?
ah oky , it create a duplicate report Purchase Order. you can delete old report in Settings--Technical--Reports
then The new report will be used
Thanks a lot, but if I update the server, will my personal report be still in place INSTEAD OF the original?
So if you want see a original rml juste change the field Report File ='my_module/report/order.rml' in Settings--Technical--Actions--Reports
to path original file rml 'purchase/report/order.rml'.
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
1
thg 1 24
|
4624 | ||
|
0
thg 3 15
|
4857 | ||
What are the steps to add a report?
Đã xử lý
|
|
2
thg 2 24
|
12832 | |
|
1
thg 1 24
|
13971 | ||
|
0
thg 3 15
|
3132 |