콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
4 답글
44148 화면

Not sure on where to start reading about modifying how invoices look. This is my first try with openerp so I don't really know much on how things work. So far I read about the openoffice and sxw files and the webkit html to pdf. Not sure which one works for v7 and how and where to start. I looked at the sxw file of my fresh install but it doesn't really look like invoice that was generated. Can someone point me in the right direction?

Thanks.

아바타
취소

Hi, Someone knows about the status of report_designer for V7.0 ? Thank you

베스트 답변

The invoices is actually two parts.

  • The company Header/Footer
  • The invoice content.

Although you can edit the sxw files directly on the file system, we will may end up with different report formats as we move forward supporting different systems. So database config does win to some degree here.

To edit the company Header/Footer I just edited the RML in Settings >> Companies >> <company> >> [edit] >> Header/Footer.

To edit the content, I installed the OpenOffice Report Designer (base_report_designer). This give you an add-on to install for OpenOffice (I use LibreOffice 3.6.2.2 on Ubuntu 12.10) to connect to the database and you can then "Modify An Existing Report". Make your changes and "Send To Server".

I've found that sometimes I can then print an invoice within OpenERP and the changes are visible, other times I have to "Conversion Brackets >> Fields" and then "Conversion Fields >> Brackets" before "Send To Server".

The RML itself lives in ir_act_report_xml.report_rml_content_data.

아바타
취소
베스트 답변

Here is how you can use the report designer, which is a module in OpenERP that allows you to change the look of most documents:

아바타
취소
베스트 답변

We switched to using JasperReports and set up a quick solution using a webservice delivering the invoice. For more information have a look in the blog section of our homepage (german language).

아바타
취소
베스트 답변

I'm a bit further down the same road. I got as far as generating a new account_print_invoice.rml, and seeing the change I made appear in the invoice pdf.

Unfortunately there are some screw ups. Below I describe how I deal with them.

Here's the steps I follow :

1) back up the two files. Eg,

 cd $OPENERP_PATH/openerp/addons/account/report
 mv account_print_invoice.sxw account_print_invoice.sxw.orig
 mv account_print_invoice.rml account_print_invoice.rml.orig

2) pull the sxw file to my desktop with :

 scp $ME@$REMOTE_HOST:$OPENERP_PATH/openerp/addons/account/report/account_print_invoice.sxw ~/Desktop

3) Open it in LibreOffice and change something visibly, a title for example

4) Save it and push it back to the server with :

scp ~/Desktop/account_print_invoice.sxw $ME@$REMOTE_HOST:$OPENERP_PATH/openerp/addons/account/report

5) Run this command to generate the rml file :

cd $OPENERP_PATH/openerp/addons/account/report
python ../../base_report_designer/openerp_sxw2rml/openerp_sxw2rml.py account_print_invoice.sxw > account_print_invoice.rml

6) Back in OpenERP, Try printing the invoice again. You should see your altered title.

The screw ups

¡Generating an rml file from the originally delivered sxw, does not get you the same rml as delivered! The resulting formatted invoice:

  1. loses it's address information, and
  2. the title section is altered.

Instead of ...

| Description | Invoice Date | Source | Customer Code |

... I get ...

| Description | Invoice Date | Partner Ref. |

Fixes The rml is not hard to read. I found a section entitled "Table_Partner_Address", containing a a macro function display_address(o.partner_id). Putting that into the sxw, regenerating the rml and then regenerating the report, produced the missing address section. This proved to me that macro functions put in the sxw will work with out any further effort in the rml.

아바타
취소
관련 게시물 답글 화면 활동
4
3월 15
6919
1
3월 15
4100
2
3월 15
8794
1
3월 15
5222
0
3월 15
3750