Alarm: do not sort by id cast as UNSIGNED

It can only work with default id generator and anyway catalog does not
understand this syntax, so this has no effect
Rework LocalRolesTemplateItem with local role group ids.

We were not able to export and import back roles of a document when more than
one local role group id was used.
accept **kw so that this script can be used as a dialog action
specify portal_types in listbox

usually generated SQL query can use a better index this way
fix a typo in workflow name
mergeRevision: Do not trust catalog

Signed-off-by: Aurélien Calonne <aurel@nexedi.com>
properly use Query instances instead of SQL hacks
remove this XXX comment which is no longer true
stock report: use high level inventory API and small cleanups
Fix getting the accounting period start date when the date passed is at a period boundary
various improvements to erp5_deferred_style

* use translationContext instead of low level hacks
* introduce a script ERP5Site_notifyReportComplete to do the actual notification
* do not activate a useless getTitle
* store strings encoded as zlib to prevent database growth
Update stock report and field library to use parameters named node_category & section_category instead of site & group
testTradeReports: create movements with both sides
fix resourceType related key that was joining stock table twice
Use a better message
relation fields can also be on reference
prefer uid over relative_url

Also remove copy pasted comments
erp5_credential: fix wrongly configured properties