32 lines
1.4 KiB
Diff
32 lines
1.4 KiB
Diff
|
Index: tryton/gui/window/view_form/model/record.py
|
||
|
===================================================================
|
||
|
|
||
|
--- a/tryton/tryton/gui/window/view_form/model/record.py
|
||
|
+++ b/tryton/tryton/gui/window/view_form/model/record.py
|
||
|
@@ -415,6 +415,8 @@
|
||
|
for fieldname, value in val.items():
|
||
|
if fieldname not in self.group.fields:
|
||
|
continue
|
||
|
+ if fieldname == self.group.exclude_field:
|
||
|
+ continue
|
||
|
if isinstance(self.group.fields[fieldname], (fields.M2OField,
|
||
|
fields.ReferenceField)):
|
||
|
field_rec_name = fieldname + '.rec_name'
|
||
|
|
||
|
Index: tryton/gui/window/view_form/view/form_gtk/many2one.py
|
||
|
===================================================================
|
||
|
|
||
|
--- a/tryton/tryton/gui/window/view_form/view/form_gtk/many2one.py
|
||
|
+++ b/tryton/tryton/gui/window/view_form/view/form_gtk/many2one.py
|
||
|
@@ -195,7 +195,8 @@
|
||
|
context = self.field.context_get(self.record)
|
||
|
return Screen(self.get_model(), domain=domain, context=context,
|
||
|
mode=['form'], view_ids=self.attrs.get('view_ids', '').split(','),
|
||
|
- views_preload=self.attrs.get('views', {}), readonly=self._readonly)
|
||
|
+ views_preload=self.attrs.get('views', {}), readonly=self._readonly,
|
||
|
+ exclude_field=self.attrs.get('relation_field'))
|
||
|
|
||
|
def sig_new(self, *args):
|
||
|
model = self.get_model()
|
||
|
|