diff --git a/issue7677.diff b/issue7677.diff new file mode 100644 index 0000000..06d4c62 --- /dev/null +++ b/issue7677.diff @@ -0,0 +1,14 @@ +diff --git a/tryton/trytond/trytond/model/modelview.py b/tryton/trytond/trytond/model/modelview.py +index 8d5cf199a8..ec32e02f57 100644 +--- a/tryton/trytond/trytond/model/modelview.py ++++ b/tryton/trytond/trytond/model/modelview.py +@@ -825,7 +825,8 @@ class ModelView(Model): + continue + if field._type in ('many2one', 'one2one', 'reference'): + if value: +- if isinstance(value, ModelStorage): ++ if isinstance(value, ModelStorage) ++ and value.id and value.id >= 0): + changed['%s.' % fname] = { + 'rec_name': value.rec_name, + } diff --git a/series b/series index 7eafa16..db888cf 100644 --- a/series +++ b/series @@ -53,3 +53,5 @@ issue12480.diff # [trytond] Support GIN index with btree_gin PostgreSQL extensio merge_request779.diff # [account_payment] Warn when submitting, approving or proceeding payment with reconciled line issue12576.diff # [account_stock_eu] Could not find the intrastat countries for moves + +issue7677.diff # [trytond] Do not set rec_name for unsaved record