diff --git a/ext/custom-addons/dp_custom/models/account.py b/ext/custom-addons/dp_custom/models/account.py
index fdf5cf87..7b5eaa6e 100644
--- a/ext/custom-addons/dp_custom/models/account.py
+++ b/ext/custom-addons/dp_custom/models/account.py
@@ -44,6 +44,15 @@ class AccountInvoice(models.Model):
positions = fields.Integer(string='Positionen', compute='_compute_positions')
num_items = fields.Integer(string='Anzahl der Artikel', compute='_compute_num_items')
+ weight_total = fields.Float(string='Gesamtgewicht', compute='_compute_weight_total')
+
+ @api.multi
+ def _compute_weight_total(self):
+ for record in self:
+ sum = 0
+ for line in record.invoice_line_ids:
+ sum += line.product_id.weight * line.quantity
+ record.weight_total = sum
@api.multi
def _compute_positions(self):
diff --git a/ext/custom-addons/dp_custom/models/sale.py b/ext/custom-addons/dp_custom/models/sale.py
index dcdf64cf..2a642757 100644
--- a/ext/custom-addons/dp_custom/models/sale.py
+++ b/ext/custom-addons/dp_custom/models/sale.py
@@ -49,6 +49,15 @@ class SaleOrder(models.Model):
earliest_scheduled_date = fields.Datetime(compute='_compute_earliest_scheduled_date')
positions = fields.Integer(string='Positionen', compute='_compute_positions')
num_items = fields.Integer(string='Anzahl der Artikel', compute='_compute_num_items')
+ weight_total = fields.Float(string='Gesamtgewicht', compute='_compute_weight_total')
+
+ @api.multi
+ def _compute_weight_total(self):
+ for record in self:
+ sum = 0
+ for line in record.order_line:
+ sum += line.product_id.weight * line.product_uom_qty
+ record.weight_total = sum
@api.multi
def _compute_positions(self):
diff --git a/ext/custom-addons/dp_reports/data/paperformat.xml b/ext/custom-addons/dp_reports/data/paperformat.xml
index f23cb430..d1c9504b 100644
--- a/ext/custom-addons/dp_reports/data/paperformat.xml
+++ b/ext/custom-addons/dp_reports/data/paperformat.xml
@@ -7,12 +7,12 @@