diff --git a/ext/custom-addons/dp_reports/reports/report_templates.xml b/ext/custom-addons/dp_reports/reports/report_templates.xml index 801573bf..c426c32d 100644 --- a/ext/custom-addons/dp_reports/reports/report_templates.xml +++ b/ext/custom-addons/dp_reports/reports/report_templates.xml @@ -45,8 +45,11 @@

- Auftragsbestätigung - Angebot + + Auftragsbestätigung + Angebot + Produktionsschein Proformarechnung diff --git a/ext/custom-addons/tz_reports_production/__init__.py b/ext/custom-addons/tz_reports_production/__init__.py new file mode 100644 index 00000000..2eeac830 --- /dev/null +++ b/ext/custom-addons/tz_reports_production/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- + +from . import models +#from . import wizards diff --git a/ext/custom-addons/tz_reports_production/__manifest__.py b/ext/custom-addons/tz_reports_production/__manifest__.py new file mode 100644 index 00000000..4e53ab4c --- /dev/null +++ b/ext/custom-addons/tz_reports_production/__manifest__.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- + +# noinspection PyStatementEffect +{ + 'name': 'TZ Report Production', + 'category': 'Custom', + 'version': '11.0.1.0.0', + 'summary': 'Print Report for Production (Description & Pictures)', + 'description': 'Print Report for Production (Description & Pictures)', + 'author': 'TZAustria', + 'website': 'https://www.tzaustria.at', + 'support': 'andreas.osim@glaser-co.at', + 'depends': [ + 'base', + 'sale', + 'dp_reports', + 'sale_management', + 'sale_comment_template', + 'dp_line_comment_template', + ], + 'data': [ + 'reports/report_production.xml', + ], + 'installable': True, + 'auto_install': False, +} diff --git a/ext/custom-addons/tz_reports_production/models/__init__.py b/ext/custom-addons/tz_reports_production/models/__init__.py new file mode 100644 index 00000000..619a5fb0 --- /dev/null +++ b/ext/custom-addons/tz_reports_production/models/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import report_helper diff --git a/ext/custom-addons/tz_reports_production/models/report_helper.py b/ext/custom-addons/tz_reports_production/models/report_helper.py new file mode 100644 index 00000000..28fe61cc --- /dev/null +++ b/ext/custom-addons/tz_reports_production/models/report_helper.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- + +from odoo import api, models + +class SaleOrder(models.AbstractModel): + _name = 'report.tz_reports_production.report_production' + _inherit = 'report.abstract_report' + _template = 'tz_reports_production.report_production' + + @api.model + def get_report_values(self, docids, data=None): + model = 'sale.order' + docs = self.env[model].browse(docids) + data.update(tz_report_production=True) + return { + 'doc_ids': docids, + 'doc_model': model, + 'docs': docs, + 'data': data, + 'field_set_in_lines': self._field_set_in_lines, + 'formatLang': self._formatLang, + } diff --git a/ext/custom-addons/tz_reports_production/reports/report_production.xml b/ext/custom-addons/tz_reports_production/reports/report_production.xml new file mode 100644 index 00000000..4cf8eee6 --- /dev/null +++ b/ext/custom-addons/tz_reports_production/reports/report_production.xml @@ -0,0 +1,295 @@ + + + + + + + + + + + + + + diff --git a/ext/custom-addons/tz_reports_production/security/ir.model.access.csv b/ext/custom-addons/tz_reports_production/security/ir.model.access.csv new file mode 100644 index 00000000..0343f29f --- /dev/null +++ b/ext/custom-addons/tz_reports_production/security/ir.model.access.csv @@ -0,0 +1 @@ +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" diff --git a/ext/custom-addons/tz_reports_production/static/description/icon.png b/ext/custom-addons/tz_reports_production/static/description/icon.png new file mode 100644 index 00000000..32c1481d Binary files /dev/null and b/ext/custom-addons/tz_reports_production/static/description/icon.png differ diff --git a/ext/custom-addons/tz_reports_production/static/src/img/favicon.ico b/ext/custom-addons/tz_reports_production/static/src/img/favicon.ico new file mode 100644 index 00000000..90f1e91c Binary files /dev/null and b/ext/custom-addons/tz_reports_production/static/src/img/favicon.ico differ