diff --git a/odex30_base/custom_report_layout/__init__.py b/odex30_base/custom_report_layout/__init__.py new file mode 100644 index 0000000..5305644 --- /dev/null +++ b/odex30_base/custom_report_layout/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import models \ No newline at end of file diff --git a/odex30_base/custom_report_layout/__manifest__.py b/odex30_base/custom_report_layout/__manifest__.py new file mode 100644 index 0000000..b2dd550 --- /dev/null +++ b/odex30_base/custom_report_layout/__manifest__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +{ + 'name': "Custom Report Layout", + 'version': '18.0.1.0.0', # تم تحديث النسخة لأودو 18 + 'summary': 'A module to configure report header and footer', + 'sequence': -100, + 'description': 'A module to configure report header and footer manually from company form', + 'author': "Ismail Mohamedi", + 'website': "https://www.linkedin.com/in/ismail-mohamedi-605537179", + 'category': 'Odex25-base', + 'license': 'LGPL-3', + 'depends': ['base'], # تأكد وجود الحزم المطلوبة لأودو 18 + 'data': [ + 'report/base_document_layout.xml', + 'views/views.xml', + ], + 'images': ['static/description/header_footer.png'], + 'installable': True, + 'application': True, + 'auto_install': False, +} diff --git a/odex30_base/custom_report_layout/models/__init__.py b/odex30_base/custom_report_layout/models/__init__.py new file mode 100644 index 0000000..5305644 --- /dev/null +++ b/odex30_base/custom_report_layout/models/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import models \ No newline at end of file diff --git a/odex30_base/custom_report_layout/models/models.py b/odex30_base/custom_report_layout/models/models.py new file mode 100644 index 0000000..707094a --- /dev/null +++ b/odex30_base/custom_report_layout/models/models.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- + +from odoo import models, fields, api, _ + + +class ResCompany(models.Model): + """""" + _inherit = "res.company" + + header = fields.Image("Header") + footer = fields.Image("Footer") + header_width = fields.Char("Header Width", default="1000") + header_height = fields.Char("Header height", default="150") + footer_width = fields.Char("Footer Width", default="1000") + footer_height = fields.Char("Footer height", default="100") \ No newline at end of file diff --git a/odex30_base/custom_report_layout/report/base_document_layout.xml b/odex30_base/custom_report_layout/report/base_document_layout.xml new file mode 100644 index 0000000..4fe8cf1 --- /dev/null +++ b/odex30_base/custom_report_layout/report/base_document_layout.xml @@ -0,0 +1,20 @@ + + + + diff --git a/odex30_base/custom_report_layout/static/description/header_footer.png b/odex30_base/custom_report_layout/static/description/header_footer.png new file mode 100644 index 0000000..76937de Binary files /dev/null and b/odex30_base/custom_report_layout/static/description/header_footer.png differ diff --git a/odex30_base/custom_report_layout/views/views.xml b/odex30_base/custom_report_layout/views/views.xml new file mode 100644 index 0000000..2b9c748 --- /dev/null +++ b/odex30_base/custom_report_layout/views/views.xml @@ -0,0 +1,28 @@ + + + + res.company.form.layout.inherit + res.company + + + + +
+ + + , + +
+
+ + + , + +
+
+
+
+
+