trytond.convert.ParsingError when activating a module that references language-conditional records
This had been reported multiple times in the past (see #11822 (closed), #12260 (closed)) but not quite addressed. I don't think this can be considered a duplicate for #9642: while the account
module is the root of most crashes, replacing the multilingual minimal chart with IFRS will not canonically solve this issue as long as
- XML records can be conditionally loaded
- the language activation workflow does not load potentially missing XML records
E.g. one could reference the Belgium account chart or taxes and still have the same problem:
trytond-admin -d dbname -l fr -u account_be
trytond-admin -d dbname -l nl
trytond-admin -d dbname -u account_be_extended # <-- CRASH
The known workaround is to manually reload the previously active modules that are missing XML records, but this is not obvious to users nor sysadmins.
trytond-admin -d dbname -u account
trytond-admin -d dbname -l <XX>
trytond-admin -d dbname --all # <-- WORKAROUND
trytond-admin -d dbname -u <xxxx>
IMHO a language activation should take care for this edge-case just as it loads the *po files from already active modules.
For the record, this affects the following core modules, as well as any module depending on them:
- account_asset
- account_deposit
- account_stock_anglo_saxon
- account_stock_continental
- sale_advance_payment