Tryton - Issues

 

Issue6635

Title Anomaly when setting a company on a new database
Priority bug Status resolved
Superseder Nosy List SISalp, ced, pokoli, reviewbot, roundup-bot, xcodinas
Type behavior Components sao
Assigned To ced Keywords review
Reviews 37731002
View: 37731002

Created on 2017-07-11.13:57:15 by SISalp, last changed by roundup-bot.

Messages
New changeset f03d51489368 by C├ędric Krier in branch 'default':
Load model access synchronously
http://hg.tryton.org/sao/rev/f03d51489368
msg36210 (view) Author: [hidden] (xcodinas) (Tryton committer) Date: 2017-10-11.15:29:49
> @xcodinas are you sure you tested with the patch? Did you rebuild sao and ensure that you do not run a cached version?

After another try with a different browser and ensuring all was right with
the patch the company wizard works as expected.
msg36133 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-10-07.13:29:23
@xcodinas are you sure you tested with the patch? Did you rebuild sao and ensure that you do not run a cached version?
msg36076 (view) Author: [hidden] (xcodinas) (Tryton committer) Date: 2017-10-05.11:36:59
>Indeed I think it is a bad idea to still use promises when doing a synchronous >call as it may lead to a random resolution of the callbacks.
>So I upload a new version that make synchronous calls returning the result >instead of promises.

With the last patch I'm still getting the same error [1] when the company wizard should be shown.


[1] TypeError: access is undefined
review37731002 updated at https://codereview.tryton.org/37731002/#ps20001
msg36017 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-10-02.16:46:27
Indeed I think it is a bad idea to still use promises when doing a synchronous call as it may lead to a random resolution of the callbacks.
So I upload a new version that make synchronous calls returning the result instead of promises.
msg36016 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-10-02.16:27:17
Please do not use paster on bug report, we do not know how much time it will be available.
msg36015 (view) Author: [hidden] (xcodinas) (Tryton committer) Date: 2017-10-02.16:23:57
> It should be fixed with review37731002.
> On older version, the problem can be fixed by logout/login.

Following Sisalp steps before getting asked to create a company, the loading
alert is shown and in the console I get this error [1] and the line of code giving that error is [2].

[1] TypeError: access is undefined
[2] https://dpaste.de/Poad
review37731002 updated at https://codereview.tryton.org/37731002/#ps1
msg35944 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-09-29.23:59:33
It should be fixed with review37731002.
On older version, the problem can be fixed by logout/login.
msg34893 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-07-30.00:38:26
This is because there is a difference in the implementation of ModelAccess between sao and tryton.
In tryton, if the requested model is unknown the accesses are refreshed transparently. But in sao, it is not done because RPC are asynchronous and we can not support to have ModelAccess asynchronous.
I think we should think about adding an option to Sao.rpc to async=false [1]. Of course this option should be used very carefully, but this issue may be one valid case to make synchronous call.

[1] https://api.jquery.com/jQuery.ajax/
msg34534 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2017-07-11.14:09:04
It seems something related to the model access. In the moment of executing the wizard the model access is not correctly refreshed so you are not allowed to create nor party.party nor currency.currency records.
msg34533 (view) Author: [hidden] (SISalp) Date: 2017-07-11.13:57:14
When initializing a new database, the configuration wizard block partner creation at new company setup.

Expected : At this stage, no party is created. Sao should propose to create a party to fill the party field of the new company.

To reproduce :
- create a new database and initialize it with trytond-admin
- open this database as admin, skip user creation.
- install account-fr which will set everything orderly for a new company
- follow the steps of the configuration wizard
- when asked to create a company, I cannot write a party name in the party field and create it, or a currency in the currency field.

Sometimes it shows a security rule break attempt message.

If page is refreshed, the behavior is correct.
If the party was created before installing account-fr, then the behaviour is correct.
On Tryton-client, the behavior is correct.
History
Date User Action Args
2017-10-13 23:36:22roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg36282
2017-10-11 15:29:49xcodinassetmessages: + msg36210
2017-10-07 13:29:24cedsetmessages: + msg36133
2017-10-05 11:37:00xcodinassetmessages: + msg36076
2017-10-02 17:08:44reviewbotsetmessages: + msg36019
2017-10-02 16:46:27cedsetmessages: + msg36017
2017-10-02 16:27:17cedsetmessages: + msg36016
2017-10-02 16:23:58xcodinassetnosy: + xcodinas
messages: + msg36015
2017-09-30 00:08:08reviewbotsetnosy: + reviewbot
messages: + msg35946
2017-09-29 23:59:34cedsetstatus: chatting -> testing
keyword: + review
title: Anomaly when seting a company on a new database with SAO 4.4 -> Anomaly when setting a company on a new database
messages: + msg35944
reviews: 37731002
assignedto: ced

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