Tryton - Issues



Title Access error when selecting party on invoice
Priority bug Status chatting
Superseder Remove company record rules
View: 4080
Nosy List ced, pokoli, reviewbot
Type crash Components account
Assigned To pokoli Keywords review
Reviews 50371002
View: 50371002

Created on 2018-05-17.15:30:43 by pokoli, last changed by pokoli.

msg40798 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-05-21.12:27:22
> I do not see the link between this issue and the last 3 new reviews.

That was for issue7198. I've already fixed it.
msg40797 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-05-21.12:24:53
I do not see the link between this issue and the last 3 new reviews.
New review45161002 at
New review45171002 at
New review46471002 at
msg40752 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-05-18.09:58:42
I will provide a patch for issue4080 but just want to have clear if we want to have some simpler patch (as the one suggested) for released versions.
msg40749 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-05-17.23:58:57
To be clear for me this is similar to issue4081. We can not fix case by case because it will end by instantiate each record individually. Just like with access rights we would ended to run all the code as root.
Also I think the best way to progress on issue4080 is to reject any quick hack which just delay the work on the real issue.
New review50371002 at
msg40719 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-05-17.15:36:47
I'm against hacking multi-company design. The only correct solution is issue4080.
msg40718 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-05-17.15:33:36
I think issue4080 is the solution for this problem, but as this is affecting released series I'm proposing review50371002 to be applied on them.

I will include other modules if we agree on the design.
msg40717 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-05-17.15:30:43
A access error is raised when selecting a party on invoice when the following conditions are meet: 

1. The database has multiple companies with multiple charts of account created.
2. The companies have defined a default receivable and payable account.
3. The party has no receivable/payable account defined and thus it uses the default values. 

We've debugged the problem and found the that this is because the multivalue mixin returns the accounts of all companies, so when reading some value of the account all the instances are read (this is a tryton design to improve performance), and this breaks the access rules as the ids for other companies are read.
Date User Action Args
2018-05-21 12:27:22pokolisetreviews: 50371002, 46471002, 45171002, 45161002 -> 50371002
messages: + msg40798
2018-05-21 12:24:54cedsetmessages: + msg40797
2018-05-21 12:20:04reviewbotsetmessages: + msg40796
2018-05-21 12:20:03reviewbotsetreviews: 50371002, 46471002, 45171002 -> 50371002, 46471002, 45171002, 45161002
2018-05-21 12:20:02reviewbotsetmessages: + msg40795
2018-05-21 12:20:01reviewbotsetreviews: 50371002, 46471002 -> 50371002, 46471002, 45171002
2018-05-21 12:20:00reviewbotsetmessages: + msg40794
2018-05-21 12:19:59reviewbotsetreviews: 50371002 -> 50371002, 46471002
2018-05-18 09:58:42pokolisetmessages: + msg40752
2018-05-17 23:58:58cedsetsuperseder: + Remove company record rules
messages: + msg40749

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