From ccd2002d9f6dfe7c25dc8f78ecc49ef84a87d1ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 30 Nov 2010 14:17:48 +0100 Subject: [PATCH] Manage xxx2many values from on_change call for issue1758 --- opportunity.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/opportunity.py b/opportunity.py index 959c8b5479..c9ed965c53 100644 --- a/opportunity.py +++ b/opportunity.py @@ -352,6 +352,12 @@ class SaleOpportunityLine(ModelSQL, ModelView): '_parent_sale.party': line.opportunity.party.id, '_parent_sale.currency': line.opportunity.company.currency.id, })) + for field_name, field in sale_line_obj._columns.iteritems(): + if field._type not in ('one2many', 'many2many'): + continue + if field_name not in res: + continue + res[field_name] = [('add', res[field_name])] return res SaleOpportunityLine()