diff --git a/ext/custom-addons/dp_custom/__manifest__.py b/ext/custom-addons/dp_custom/__manifest__.py
index e3b580ca..53c3eef9 100644
--- a/ext/custom-addons/dp_custom/__manifest__.py
+++ b/ext/custom-addons/dp_custom/__manifest__.py
@@ -51,6 +51,7 @@
'views/material_type_views.xml',
'views/product_views.xml',
'views/ir_attachment_views.xml',
+ 'views/res_company_views.xml',
'security/ir.model.access.csv',
],
'installable': True,
diff --git a/ext/custom-addons/dp_custom/models/res_company.py b/ext/custom-addons/dp_custom/models/res_company.py
index 52c78e23..68d330a3 100644
--- a/ext/custom-addons/dp_custom/models/res_company.py
+++ b/ext/custom-addons/dp_custom/models/res_company.py
@@ -21,12 +21,14 @@
import os
import base64
-from odoo import models, api
+from odoo import models, api, fields
class Company(models.Model):
_inherit = 'res.company'
+ eori_nr = fields.Char(string='EORI-Nr')
+
@api.model
def set_company_logo(self, company, logo):
filename = os.path.join(os.path.dirname(os.path.realpath(__file__)), logo)
diff --git a/ext/custom-addons/dp_custom/models/sale.py b/ext/custom-addons/dp_custom/models/sale.py
index 1f7ad61f..e1781312 100644
--- a/ext/custom-addons/dp_custom/models/sale.py
+++ b/ext/custom-addons/dp_custom/models/sale.py
@@ -42,6 +42,18 @@ class SaleOrder(models.Model):
quote_name = fields.Char(compute='_compute_quote_name')
internal_notes = fields.Text()
assembly_notes = fields.Text()
+ earliest_scheduled_date = fields.Datetime(compute='_compute_earliest_scheduled_date')
+
+ @api.multi
+ def _compute_earliest_scheduled_date(self):
+ for record in self:
+ earliest_scheduled_date = False
+ for picking in record.picking_ids:
+ if not earliest_scheduled_date or earliest_scheduled_date > fields.Datetime.from_string(
+ picking.scheduled_date):
+ earliest_scheduled_date = fields.Datetime.from_string(picking.scheduled_date)
+ if earliest_scheduled_date:
+ record.earliest_scheduled_date = earliest_scheduled_date
@api.multi
def _compute_quote_name(self):
diff --git a/ext/custom-addons/dp_custom/views/res_company_views.xml b/ext/custom-addons/dp_custom/views/res_company_views.xml
new file mode 100644
index 00000000..aa6beb28
--- /dev/null
+++ b/ext/custom-addons/dp_custom/views/res_company_views.xml
@@ -0,0 +1,15 @@
+
+
+
+
+ res_company_form_view
+ res.company
+
+
+
+
+
+
+
+
+
diff --git a/ext/custom-addons/dp_reports/models/res_company.py b/ext/custom-addons/dp_reports/models/res_company.py
index ef716a98..2e79e80a 100644
--- a/ext/custom-addons/dp_reports/models/res_company.py
+++ b/ext/custom-addons/dp_reports/models/res_company.py
@@ -1,9 +1,9 @@
+# -*- coding: utf-8 -*-
-
-from odoo import models, fields, api
+from odoo import models, fields
class Company(models.Model):
_inherit = 'res.company'
- external_report_layout = fields.Selection(selection_add=[("custom", "Custom")])
+ external_report_layout = fields.Selection(selection_add=[("custom", "Custom")], default='custom')
diff --git a/ext/custom-addons/dp_reports/reports/report_templates.xml b/ext/custom-addons/dp_reports/reports/report_templates.xml
index 5ed9b315..01c32838 100644
--- a/ext/custom-addons/dp_reports/reports/report_templates.xml
+++ b/ext/custom-addons/dp_reports/reports/report_templates.xml
@@ -9,11 +9,13 @@
-
-
-
+
+
+
+
-
+
+
@@ -64,6 +66,9 @@
+
+
+
@@ -76,28 +81,21 @@