Tryton - Issues

 

Issue9308

Title AccessError when clicking a link button on an unsaved record
Priority bug Status chatting
Superseder Nosy List ced, pokoli
Type behavior Components
Assigned To Keywords
Reviews

Created on 2020-05-07.11:43:39 by pokoli, last changed by ced.

Messages
msg57866 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2020-05-07.12:02:30
I do not think we should save when clicking on Link because a Link will not always be on the top level form. So we can not trigger a partial save.
I do not think neither we should prevent to click on an unsaved record because the action may not depend on the record id.
I think the problem is in the code that tries to read an unsaved sale.
msg57865 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2020-05-07.11:43:38
Steps to reproduce: 

1. Create a new sale
2. Before saving it click the shipment link.

The following error is raised: 

'You are not allowed to read records "-3" of "Sale" because of at least one of these rules: User in company'

I won't expected an error here. 

I see several options here: 

* Save the record when clicking on the link (like other buttons)
* Make the links readonly until the record is saved.
History
Date User Action Args
2020-05-07 12:02:31cedsetstatus: unread -> chatting
nosy: + ced
messages: + msg57866
2020-05-07 11:43:39pokolicreate

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