Strange synchronisation issue

With a base upgraded from 5.0 -> 5.2 -> 5.4 and now to 5.6, I’m noticing 8 records that don’t seem to synchronise, but there is no apparent error either…

$ trytond-console <bla bla bla>
/usr/lib/python3.8/site-packages/genshi/filters/i18n.py:352: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  assert numeral is not '', "at least pass the numeral param"
/usr/lib/python3.8/site-packages/zeep/loader.py:3: DeprecationWarning: defusedxml.lxml is no longer supported and will be removed in a future release.
  from defusedxml.lxml import fromstring
Tryton 5.6.1, Python 3.8.2 (default, Apr  8 2020, 14:31:25) 
[GCC 9.3.0] on linux
>>> Data = pool.get('ir.model.data')
>>> ms = Data.search([('out_of_sync', '=', True)])
>>> len(ms)
8
>>> Data.sync(ms)
>>> transaction.commit()
>>> ms = Data.search([('out_of_sync', '=', True)])
>>> len(ms)
8
>>> for m in ms: print (m.id,m.model,m.module,'(', m.fs_values, '<=>',m.values, ')')
... 
6181 account.journal.type account ( [["code","general"],["name","General"]] <=> [["code", "general"], ["name", "General"]] )
6182 account.journal.type account ( [["code","revenue"],["name","Revenue"]] <=> [["code", "revenue"], ["name", "Revenue"]] )
6183 account.journal.type account ( [["code","expense"],["name","Expense"]] <=> [["code", "expense"], ["name", "Expense"]] )
6184 account.journal.type account ( [["code","cash"],["name","Cash"]] <=> [["code", "cash"], ["name", "Cash"]] )
6185 account.journal.type account ( [["code","situation"],["name","Situation"]] <=> [["code", "situation"], ["name", "Situation"]] )
6186 account.journal.type account ( [["code","write-off"],["name","Write-Off"]] <=> [["code", "write-off"], ["name", "Write-Off"]] )
6817 account.journal.type account_statement ( [["code","statement"],["name","Statement"]] <=> [["code", "statement"], ["name", "Statement"]] )
8442 account.journal.type account_asset ( [["code","asset"],["name","Asset"]] <=> [["code", "asset"], ["name", "Asset"]] )

notice that fs_values are the same as the values in use!

What might cause this? Old data not in unicode?

actually, I see it now, there is a space after each comma in values. ?!

I see that the problem comes from the account.journal.type which has removed on 5.0 series.

I think you missed one of the points of the 4.8 to 5.0 migration.. Executing it should solve the issue.

1 Like

Deleting those records naturally resolves the problem… Thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.