[MOV] sale: merge sale & sale_enterprise

Now that dashboard views have been removed, there is no reason
to keep a dedicated module with 2 custom fields that could be
in community.

* Move sale.report fields:
  * invoice_status field is simply moved as is
  * avg_days_to_confirm is removed, as it was only used and meaningful in the dasbhoard view
* Merge views content inside the parent view

Task-3011195

closes odoo/odoo#104920

Related: odoo/enterprise#33588
Related: odoo/upgrade#4010
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This commit is contained in:
Victor Feyens
2022-12-08 15:51:16 +01:00
parent 6db6eb60e6
commit 6e11f14970
3 changed files with 13 additions and 0 deletions
+1
View File
@@ -52,6 +52,7 @@ class SaleReport(models.Model):
pos.name AS name,
pos.date_order AS date,
CASE WHEN pos.state = 'draft' THEN 'pos_draft' WHEN pos.state = 'done' THEN 'pos_done' else pos.state END AS state,
NULL as invoice_status,
pos.partner_id AS partner_id,
pos.user_id AS user_id,
pos.company_id AS company_id,
+9
View File
@@ -47,6 +47,13 @@ class SaleReport(models.Model):
('done', 'Sales Done'),
('cancel', 'Cancelled'),
], string='Status', readonly=True)
invoice_status = fields.Selection(
selection=[
('upselling', "Upselling Opportunity"),
('invoiced', "Fully Invoiced"),
('to invoice', "To Invoice"),
('no', "Nothing to Invoice"),
], string="Invoice Status", readonly=True)
weight = fields.Float('Gross Weight', readonly=True)
volume = fields.Float('Volume', readonly=True)
@@ -95,6 +102,7 @@ class SaleReport(models.Model):
s.name AS name,
s.date_order AS date,
s.state AS state,
s.invoice_status as invoice_status,
s.partner_id AS partner_id,
s.user_id AS user_id,
s.company_id AS company_id,
@@ -171,6 +179,7 @@ class SaleReport(models.Model):
s.partner_id,
s.user_id,
s.state,
s.invoice_status,
s.company_id,
s.campaign_id,
s.medium_id,
+3
View File
@@ -38,6 +38,7 @@
<field name="price_subtotal" optional="hide" sum="Sum of Untaxed Total"/>
<field name="price_total" optional="show" sum="Sum of Total"/>
<field name="state" optional="hide"/>
<field name="invoice_status" optional="hide"/>
</tree>
</field>
</record>
@@ -58,6 +59,8 @@
<field name="team_id"/>
<field name="product_id"/>
<field name="categ_id"/>
<filter name="to_invoice" string="To Invoice" domain="[('invoice_status', '=', 'to invoice')]"/>
<filter name="fully_invoiced" string="Fully Invoiced" domain="[('invoice_status', '=', 'invoiced')]"/>
<field name="partner_id"/>
<field name="country_id"/>
<field name="industry_id"/>