diff --git a/ext/custom-addons/dp_custom/models/product.py b/ext/custom-addons/dp_custom/models/product.py index bcc8e2e0..2faecc3e 100644 --- a/ext/custom-addons/dp_custom/models/product.py +++ b/ext/custom-addons/dp_custom/models/product.py @@ -60,7 +60,7 @@ class ProductTemplate(models.Model): manufacturing_number = fields.Char(string='Herstellnummer') product_color = fields.Char(string='Farbe') - @api.onchange('length', 'width', 'thickness') + @api.onchange('length', 'width', 'thickness', 'height') def _onchange_measures(self): if self.length>0 and self.width>0 and self.thickness>0: self.volume = self.length*self.width*self.thickness / (1000*1000*1000) diff --git a/ext/custom-addons/dp_custom/models/stock.py b/ext/custom-addons/dp_custom/models/stock.py index ceb356cd..f6379afc 100644 --- a/ext/custom-addons/dp_custom/models/stock.py +++ b/ext/custom-addons/dp_custom/models/stock.py @@ -52,6 +52,13 @@ class StockProductionLot(models.Model): class StockPicking(models.Model): _inherit = 'stock.picking' + dlv_partner_ref = fields.Text(compute='_get_partner_ref', store=False, string='Interne Referenz') + + @api.multi + def _get_partner_ref(self): + for record in self: + record.dlv_partner_ref = record.partner_id.ref + @api.model def _formatLang(self, value): lang = self.partner_id.lang diff --git a/ext/custom-addons/dp_custom/views/stock_views.xml b/ext/custom-addons/dp_custom/views/stock_views.xml index 43066eb0..b207fb61 100644 --- a/ext/custom-addons/dp_custom/views/stock_views.xml +++ b/ext/custom-addons/dp_custom/views/stock_views.xml @@ -27,6 +27,9 @@ stock.picking + + +