1.PyDev + Eclipse (Python 2.7 + OpenERP Version 7.0)
2.OpenOffice + Plugin : base_report_designer (Download)
ในบทความนี้เราจะมาศึกษาโครงสร้างของ Report ใน OpenERP (ตัวอย่างมาจาก Module : eInvoice & Payment)
module/__openerp__.py #ข้อมูลทั่วไปของ modulemodule/report/account_print_invoice.rml #ส่วนของ Report ที่เราสร้างmodule/report/account_print_invoice.py #การตั้งค่า parser ของ reportmodule/report/__init__.py #การโหลด codemodule/reports.xml # ส่วนการ register reportmodule/__init__.py # การโหลด code__openerp__.py
อยู่ใน folder ตามภาพด้านล่าง
จากไฟล์ __openerp__.py จะเก็บข้อมูลทั่วไปเกี่ยวกับ module ที่เราจะสร้าง
__init__.py
ไฟล์ __init__.py จะให้โหลด code ต่างๆ ที่อยู่ใต้ module : account
report.xml
ตาม path ด้านล่าง
xxxx.xml ใช้ในการ register report ที่เราสร้างขึ้น
report/__init__.py
อยู่ใน path : report
ใช้ในการโหลด code ภายใน folder : report
report/account_print_invoice.py
อยู่ใน folder
ใน account_print_invoice.py จะเก็บ parser ของ report
report/account_print_invoice.rml
อยู่ใน folder
xxx.rml คือตัว report ที่เราสร้าง ซึ่งจะแปลงเป็น word,pdf ตามแต่เรากำหนด
สำหรับโครงสร้างของการสร้าง report ใน OpenERP ก็มีเท่านี้ ตอนที่ 2 เราจะมาทดลองสร้าง report เข้าไปใน account โดยใช้ชื่อ report ว่า account_print_invoice_all












ไม่มีความคิดเห็น:
แสดงความคิดเห็น