diff --git a/ext/custom-addons/dp_custom/models/sale.py b/ext/custom-addons/dp_custom/models/sale.py index 78d2e8c0..5f34eaff 100644 --- a/ext/custom-addons/dp_custom/models/sale.py +++ b/ext/custom-addons/dp_custom/models/sale.py @@ -67,6 +67,7 @@ class SaleOrder(models.Model): earliest_scheduled_date = fields.Datetime(compute='_compute_earliest_scheduled_date') positions = fields.Integer(string='Positionen', compute='_compute_positions') production_positions = fields.Integer(string='Positionen', compute='_compute_positions', store=False) + assembly_positions = fields.Integer(string='Positionen', compute='_compute_positions', store=False) num_items = fields.Integer(string='Anzahl der Artikel', compute='_compute_num_items') weight_total = fields.Float(string='Gesamtgewicht', compute='_compute_weight_total') confirmation_nr = fields.Char('Freigabenummer',track_visibility='onchange') @@ -177,8 +178,11 @@ class SaleOrder(models.Model): pg_complete = True p = 0 pp = 0 + pa = 0 for line in record.order_line: p += 1 + if line.lot_id.assembled: + pa += 1 if line.product_id.material_type_id.production_relevant: pp += 1 if line.product_uom_qty > line.qty_delivered and line.from_designbox: @@ -187,6 +191,7 @@ class SaleOrder(models.Model): record.pg9_complete = pg_complete record.positions = p record.production_positions = pp + record.assembly_positions = pa @api.multi def _compute_num_items(self): diff --git a/ext/custom-addons/dp_custom/views/sale_views.xml b/ext/custom-addons/dp_custom/views/sale_views.xml index 4e7408a2..70fedbfb 100644 --- a/ext/custom-addons/dp_custom/views/sale_views.xml +++ b/ext/custom-addons/dp_custom/views/sale_views.xml @@ -145,6 +145,7 @@ + diff --git a/ext/custom-addons/tz_reports_production/reports/report_production.xml b/ext/custom-addons/tz_reports_production/reports/report_production.xml index 0905d8bb..48dfa438 100644 --- a/ext/custom-addons/tz_reports_production/reports/report_production.xml +++ b/ext/custom-addons/tz_reports_production/reports/report_production.xml @@ -53,6 +53,10 @@ Positionen: + + Zusammengebaut: + +
@@ -66,12 +70,10 @@ Email: -

- - Warenkorb/Ref: - - -

+ + Zusammengebaut: + +
@@ -85,6 +87,16 @@ Telefon: +

+ + Warenkorb/Ref: + + +

+
+
+
+
Freigabe-Nr: