3
0
Fork 0

[FIX] web_widget_x2many_2d_matrix: RST syntax

9.0
Pedro M. Baeza 2019-11-05 09:50:51 +01:00 committed by GitHub
parent 1fdc962a22
commit 14f2ab360a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 6 deletions

View File

@ -123,12 +123,15 @@ Known issues / Roadmap
* If you pass values with an onchange, you need to overwrite the model's method * If you pass values with an onchange, you need to overwrite the model's method
`onchange` for making the widget work:: `onchange` for making the widget work::
@api.multi .. code-block:: python
def onchange(self, values, field_name, field_onchange):
if "one2many_field" in field_onchange: @api.multi
for sub in [<field_list>]: def onchange(self, values, field_name, field_onchange):
field_onchange.setdefault("one2many_field." + sub, u"") if "one2many_field" in field_onchange:
return super(model, self).onchange(values, field_name, field_onchange) for sub in [<field_list>]:
field_onchange.setdefault("one2many_field." + sub, u"")
return super(model, self).onchange(values, field_name, field_onchange)
Bug Tracker Bug Tracker
=========== ===========