diff --git a/ext/custom-addons/dp_reports_sale/models/report_helper.py b/ext/custom-addons/dp_reports_sale/models/report_helper.py index 5ae379e8..1af0e2fb 100644 --- a/ext/custom-addons/dp_reports_sale/models/report_helper.py +++ b/ext/custom-addons/dp_reports_sale/models/report_helper.py @@ -20,3 +20,22 @@ class SaleOrder(models.AbstractModel): 'field_set_in_lines': self._field_set_in_lines, 'formatLang': self._formatLang, } + + +class SaleOrderProForma(models.AbstractModel): + _name = 'report.sale.report_saleorder_pro_forma' + _inherit = 'report.abstract_report' + _template = 'sale.report_saleorder_pro_forma' + + @api.model + def get_report_values(self, docids, data=None): + model = 'sale.order' + docs = self.env[model].browse(docids) + 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/dp_reports_sale/reports/sale.xml b/ext/custom-addons/dp_reports_sale/reports/sale.xml index 1eefc9f5..95c250fc 100644 --- a/ext/custom-addons/dp_reports_sale/reports/sale.xml +++ b/ext/custom-addons/dp_reports_sale/reports/sale.xml @@ -1,238 +1,256 @@ - - - - + + + +