diff --git a/addons/sale/report/account_invoice_report.py b/addons/sale/report/account_invoice_report.py index f41cc8c3f7f..cf751da997e 100644 --- a/addons/sale/report/account_invoice_report.py +++ b/addons/sale/report/account_invoice_report.py @@ -7,7 +7,7 @@ from odoo import fields, models class AccountInvoiceReport(models.Model): _inherit = 'account.invoice.report' - team_id = fields.Many2one('crm.team', string='Sales Team') + team_id = fields.Many2one(comodel_name='crm.team', string="Sales Team") def _select(self): - return super(AccountInvoiceReport, self)._select() + ", move.team_id as team_id" + return super()._select() + ", move.team_id as team_id" diff --git a/addons/sale/report/account_invoice_report_views.xml b/addons/sale/report/account_invoice_report_views.xml index 08df6ff4882..3521a61cfc4 100644 --- a/addons/sale/report/account_invoice_report_views.xml +++ b/addons/sale/report/account_invoice_report_views.xml @@ -6,12 +6,12 @@ account.invoice.report - - - - + + + + - + diff --git a/addons/sale/report/ir_actions_report.xml b/addons/sale/report/ir_actions_report.xml index e3160d14d83..ff5fbbe635f 100644 --- a/addons/sale/report/ir_actions_report.xml +++ b/addons/sale/report/ir_actions_report.xml @@ -1,27 +1,27 @@ - - - Quotation / Order - sale.order - qweb-pdf - sale.report_saleorder - sale.report_saleorder - (object.state in ('draft', 'sent') and 'Quotation - %s' % (object.name)) or 'Order - %s' % (object.name) - - report - - - PRO-FORMA Invoice - sale.order - qweb-pdf - sale.report_saleorder_pro_forma - sale.report_saleorder_pro_forma - 'PRO-FORMA - %s' % (object.name) - - report - - - + + Quotation / Order + sale.order + qweb-pdf + sale.report_saleorder + sale.report_saleorder + (object.state in ('draft', 'sent') and 'Quotation - %s' % (object.name)) or 'Order - %s' % (object.name) + + report + + + + PRO-FORMA Invoice + sale.order + qweb-pdf + sale.report_saleorder_pro_forma + sale.report_saleorder_pro_forma + 'PRO-FORMA - %s' % (object.name) + + report + + + diff --git a/addons/sale/report/ir_actions_report_templates.xml b/addons/sale/report/ir_actions_report_templates.xml index f6d0ba612a0..2c98288aeb8 100644 --- a/addons/sale/report/ir_actions_report_templates.xml +++ b/addons/sale/report/ir_actions_report_templates.xml @@ -13,10 +13,16 @@ and doc.partner_invoice_id != doc.partner_id or doc.partner_shipping_id != doc.partner_invoice_id"> - Invoicing and Shipping Address: - Invoicing Address: + + + Invoicing and Shipping Address: + + + Invoicing Address: + +
+ t-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True, "phone_icons": True}'/> Shipping Address:

- - Order # - Quotation # - - - Pro-Forma Invoice # - + Pro-Forma Invoice # + Quotation # + Order #

-
+
Your Reference:

-
- Order Date: -

-

-
- Quotation Date: +
+ Quotation Date: + Order Date:

-
+
Expiration:

@@ -111,14 +112,14 @@ - + - + @@ -170,7 +171,8 @@

-

+

Fiscal Position Remark:

diff --git a/addons/sale/report/sale_report.py b/addons/sale/report/sale_report.py index 1e623181231..d77d735b9a6 100644 --- a/addons/sale/report/sale_report.py +++ b/addons/sale/report/sale_report.py @@ -53,9 +53,9 @@ class SaleReport(models.Model): discount = fields.Float('Discount %', readonly=True) discount_amount = fields.Float('Discount Amount', readonly=True) - campaign_id = fields.Many2one('utm.campaign', 'Campaign') - medium_id = fields.Many2one('utm.medium', 'Medium') - source_id = fields.Many2one('utm.source', 'Source') + campaign_id = fields.Many2one('utm.campaign', 'Campaign', readonly=True) + medium_id = fields.Many2one('utm.medium', 'Medium', readonly=True) + source_id = fields.Many2one('utm.source', 'Source', readonly=True) order_id = fields.Many2one('sale.order', 'Order #', readonly=True) @@ -158,6 +158,8 @@ class SaleReport(models.Model): tools.drop_view_if_exists(self.env.cr, self._table) self.env.cr.execute("""CREATE or REPLACE VIEW %s as (%s)""" % (self._table, self._query())) + +# FIXME is this used somewhere ? class SaleOrderReportProforma(models.AbstractModel): _name = 'report.sale.report_saleproforma' _description = 'Proforma Report' diff --git a/addons/sale/report/sale_report_views.xml b/addons/sale/report/sale_report_views.xml index 339a8bd1fda..e2cb72f7d4d 100644 --- a/addons/sale/report/sale_report_views.xml +++ b/addons/sale/report/sale_report_views.xml @@ -49,8 +49,8 @@ - - + + @@ -73,7 +73,7 @@ - +