Tryton - Issues

 

Issue6652

Title Allow root to be in any companies
Priority feature Status resolved
Superseder Add __int__ to Model
View: 6661
Nosy List ced, reviewbot, roundup-bot
Type feature request Components company
Assigned To ced Keywords review
Reviews 36491002,42551002
View: 36491002, 42551002

Created on 2017-07-18.18:07:19 by ced, last changed by roundup-bot.

Messages
New changeset 1c528a7ab81f by Cédric Krier in branch 'default':
Add set_user tools for test scenario
http://hg.tryton.org/modules/stock_supply/rev/1c528a7ab81f
New changeset 566cea7e4d65 by Cédric Krier in branch 'default':
Add set_user tools for test scenario
http://hg.tryton.org/modules/stock/rev/566cea7e4d65
New changeset 449dc29b325a by Cédric Krier in branch 'default':
Add set_user tools for test scenario
http://hg.tryton.org/modules/sale_supply_drop_shipment/rev/449dc29b325a
New changeset 697ca0b68593 by Cédric Krier in branch 'default':
Add set_user tools for test scenario
http://hg.tryton.org/modules/sale_supply/rev/697ca0b68593
New changeset c3ba3c82d6eb by Cédric Krier in branch 'default':
Add set_user tools for test scenario
http://hg.tryton.org/modules/sale_shipment_grouping/rev/c3ba3c82d6eb
New changeset a436476a9f4b by Cédric Krier in branch 'default':
Add set_user tools for test scenario
http://hg.tryton.org/modules/sale_price_list/rev/a436476a9f4b
New changeset 3f0ccde0b879 by Cédric Krier in branch 'default':
Add set_user tools for test scenario
http://hg.tryton.org/modules/sale_opportunity/rev/3f0ccde0b879
New changeset 3a2cd0d47ce3 by Cédric Krier in branch 'default':
Add set_user tools for test scenario
http://hg.tryton.org/modules/sale_invoice_grouping/rev/3a2cd0d47ce3
New changeset 5226b3a1894e by Cédric Krier in branch 'default':
Add set_user tools for test scenario
http://hg.tryton.org/modules/sale/rev/5226b3a1894e
New changeset 15a7af16cc73 by Cédric Krier in branch 'default':
Add set_user tools for test scenario
http://hg.tryton.org/modules/purchase_requisition/rev/15a7af16cc73
New changeset dce2d2c4ebd9 by Cédric Krier in branch 'default':
Add set_user tools for test scenario
http://hg.tryton.org/modules/purchase_request/rev/dce2d2c4ebd9
New changeset 92ba2605071a by Cédric Krier in branch 'default':
Add set_user tools for test scenario
http://hg.tryton.org/modules/purchase_invoice_line_standalone/rev/92ba2605071a
New changeset 2407d11654a3 by Cédric Krier in branch 'default':
Add set_user tools for test scenario
http://hg.tryton.org/modules/purchase/rev/2407d11654a3
New changeset bdf556850afa by Cédric Krier in branch 'default':
Add set_user tools for test scenario
http://hg.tryton.org/modules/project_invoice/rev/bdf556850afa
New changeset a5f2afc29cbe by Cédric Krier in branch 'default':
Add set_user tools for test scenario
http://hg.tryton.org/modules/analytic_sale/rev/a5f2afc29cbe
New changeset 7f890da02699 by Cédric Krier in branch 'default':
Add set_user tools for test scenario
http://hg.tryton.org/modules/analytic_purchase/rev/7f890da02699
New changeset 77ab38a01364 by Cédric Krier in branch 'default':
Add set_user tools for test scenario
http://hg.tryton.org/modules/account_stock_anglo_saxon/rev/77ab38a01364
New changeset 89d943137bbb by Cédric Krier in branch 'default':
Add set_user tools for test scenario
http://hg.tryton.org/modules/account_dunning_letter/rev/89d943137bbb
New changeset 521b78546090 by Cédric Krier in branch 'default':
Add set_user tools for test scenario
http://hg.tryton.org/modules/account_dunning/rev/521b78546090
New changeset 4eb3d177da90 by Cédric Krier in branch 'default':
Add set_user tools for test scenario
http://hg.tryton.org/trytond/rev/4eb3d177da90
New changeset 9e9e11f88ea2 by Cédric Krier in branch 'default':
Allow root to behave as any company or employee
http://hg.tryton.org/modules/company/rev/9e9e11f88ea2
review42551002 updated at https://codereview.tryton.org/42551002/#ps20001
review42551002 updated at https://codereview.tryton.org/42551002/#ps1
msg34711 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-07-20.19:41:48
Here is review42551002 that make reloading the context when changing the user in scenario. It requires issue6661.
msg34683 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-07-19.00:37:30
Some tests fail with the patch because their scenario set a different user but keep the old context with wrong employee.
review36491002 updated at https://codereview.tryton.org/36491002/#ps1
msg34673 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-07-18.18:08:43
And also issue6177
msg34672 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-07-18.18:07:19
User.read is overridden to change the company and employee value with the value from context. But it is only allowed if the user has the right.
I think root user should always have the right to use any context value because it can not be used for RPC calls.
This may help issue2286 by always using root to run cron job.
History
Date User Action Args
2017-08-02 19:39:30roundup-botsetmessages: + msg34991
2017-08-02 19:39:26roundup-botsetmessages: + msg34990
2017-08-02 19:39:25roundup-botsetmessages: + msg34989
2017-08-02 19:39:24roundup-botsetmessages: + msg34988
2017-08-02 19:39:23roundup-botsetmessages: + msg34987
2017-08-02 19:39:21roundup-botsetmessages: + msg34986
2017-08-02 19:39:19roundup-botsetmessages: + msg34985
2017-08-02 19:39:19roundup-botsetmessages: + msg34984
2017-08-02 19:39:17roundup-botsetmessages: + msg34983
2017-08-02 19:39:15roundup-botsetmessages: + msg34982

Showing 10 items. Show all history (warning: this could be VERY long)