Message 65185

Author
ced
Date
2021-03-06.00:39:18
Message id
65185

Content

Instead of removing the company record rule, I think we should update them to be more flexible.
With issue10163 we could add a flag on the user company_only_current to show records of all listed companies or only the current company. The flag will be in the context and editable by the user.
The rule would be with a domain like:
[If(Eval('user', {}).get('company_only_current'), ('company', '=', Eval('user', {}).get('company', -1)), ('company', 'in', Eval('user', {}).get('companies', []))]

For me it will provide enough flexible to support simple setup like a mono-company and complex one where each user has different accesses and some may want to see only their current company and other all their companies.

History
Date User Action Args
2021-03-06 00:39:18cedsetmessageid: <1614987558.1822193.GLAQSEXNA5TRNZIK.issue4080@tryton.org>
2021-03-06 00:39:18cedsetrecipients: + ohuisman, pokoli, roundup-bot, reviewbot
2021-03-06 00:39:18cedlinkissue4080 messages
2021-03-06 00:39:18cedcreate