Re: [tryton-dev] Move origin issue when in same period
On 2018-05-08 22:46, Richard PALO wrote: > BTW, why does save(), for example on a move, automatically save() its lines? > Is the problem because origin is unidirectional? Because proteus simulate the behavior of other clients. -- Cédric Krier - B2CK SPRL Email/Jabber: cedric.kr...@b2ck.com Tel: +32 472 54 46 59 Website: http://www.b2ck.com/ -- You received this message because you are subscribed to the Google Groups "tryton-dev" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton-dev/20180508205226.GC12271%40kei.
Re: [tryton-dev] Move origin issue when in same period
Le 08/05/2018 à 19:56, Cédric Krier a écrit : The origin must be saved before being assigned if you want to store the saved id. I submitted https://bugs.tryton.org/issue7421 to prevent the exception raising. Ok, I'm trying the following, based upon what I see e.g. in modelstorage.py: if move_origin.id is None or move_origin.id < 0: move_origin.save() # work-around for same period origins new_move.origin = move_origin This should keep use of save() down to the handful of cases where id is actually < 0 BTW, why does save(), for example on a move, automatically save() its lines? Is the problem because origin is unidirectional? -- Richard PALO -- You received this message because you are subscribed to the Google Groups "tryton-dev" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton-dev/0f71a0b0-c227-606b-94c0-5863c58658e8%40netbsd.org.
Re: [tryton-dev] Missing translations for release 4.8
Hi, Mon, 7 May 2018 14:45:39 +0200 Sergi Almacellas Abellana: >El 07/05/18 a les 14:38, Udo Spallek ha escrit: >> Is it correct that there are more than 5000 entries to edit? >This probably because you get results from country and currency >modules. Skipping this modules gives (at least for catalan) less words >to translate. See: >Hope it helps. yes, it was helpful. Thanks a lot. The German translation is ready to review by Clemens Hupka. Regards Udo -- You received this message because you are subscribed to the Google Groups "tryton-dev" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton-dev/20180508213626.79cbefaf%40bender.fritz.box. pgp5v8DLMIf5j.pgp Description: Digitale Signatur von OpenPGP
Re: [tryton-dev] Move origin issue when in same period
On 2018-05-08 18:48, Richard PALO wrote: > I came across a difficulty noticed during FEC generation (French plan) where I > get the following exception: > >... > > File "/trytond/modules/account_fr/account.py", line 315, in get_reference > > return line.move.origin.rec_name > > AttributeError: 'str' object has no attribute 'rec_name' > > To briefly explain the issue, it concerns a reversal entry having origin set > to the initial entry at the same date (ie:cancel). > > As these entries are bulk loaded via an openerp2tryton migration script, > Move.save() > is invoked for all the moves in the period, period by period. > > What I notice is that the origin saved in the database is > "account.move,-272790" so I > presume the error is related to the fact that the referenced move is not yet > saved when > the origin was set, even though when really saved, the origin move will have > been saved. > > Indeed, all the moves where the reversal entry is in a different period have > the origin with > a non-negative number, with no problem during FEC generation. It concerns > only the moves > generated in the same period for this scenario. > > So the question I pose, without resorting to individual saves on the moves > which would probably > have disastrous timing repercussions on the import (>35K moves), is there > perhaps an outside chance > that something is forgetting to verify the state (.reload()?) of the origin > move prior to saving? > > Any other suggestion(s)? The origin must be saved before being assigned if you want to store the saved id. I submitted https://bugs.tryton.org/issue7421 to prevent the exception raising. -- Cédric Krier - B2CK SPRL Email/Jabber: cedric.kr...@b2ck.com Tel: +32 472 54 46 59 Website: http://www.b2ck.com/ -- You received this message because you are subscribed to the Google Groups "tryton-dev" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton-dev/20180508175617.GA12271%40kei.
[tryton-dev] Move origin issue when in same period
I came across a difficulty noticed during FEC generation (French plan) where I get the following exception: ... File "/trytond/modules/account_fr/account.py", line 315, in get_reference return line.move.origin.rec_name AttributeError: 'str' object has no attribute 'rec_name' To briefly explain the issue, it concerns a reversal entry having origin set to the initial entry at the same date (ie:cancel). As these entries are bulk loaded via an openerp2tryton migration script, Move.save() is invoked for all the moves in the period, period by period. What I notice is that the origin saved in the database is "account.move,-272790" so I presume the error is related to the fact that the referenced move is not yet saved when the origin was set, even though when really saved, the origin move will have been saved. Indeed, all the moves where the reversal entry is in a different period have the origin with a non-negative number, with no problem during FEC generation. It concerns only the moves generated in the same period for this scenario. So the question I pose, without resorting to individual saves on the moves which would probably have disastrous timing repercussions on the import (>35K moves), is there perhaps an outside chance that something is forgetting to verify the state (.reload()?) of the origin move prior to saving? Any other suggestion(s)? If needed, I can probably provide a proteus test script demonstrating the problem. -- Richard PALO -- You received this message because you are subscribed to the Google Groups "tryton-dev" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton-dev/a3bd28c5-d59e-f70b-c959-ae12474e5d40%40netbsd.org.
Re: [tryton-dev] NSIS new string PreviousInstall
Tue, 8 May 2018 10:30:43 +0200 Udo Spallek: >Tue, 8 May 2018 00:15:32 +0200 >Cédric Krier : >>LangString PreviousInstall ${CURLANG} "Tryton is already >> installed.$\n$\nClick `OK` to remove the previous version or `Cancel` >> to cancel this upgrade." >German: "Tryton ist bereits installiert.$\n$\nWählen Sie `OK` um die >bisherige Version zu entfernen oder `Abbrechen` um die Aktualisierung >abzubrechen." sorry, typo: German: "Tryton ist bereits installiert.$\n$\nWählen Sie `OK`, um die bisherige Version zu entfernen oder `Abbrechen` um die Aktualisierung abzubrechen." -- You received this message because you are subscribed to the Google Groups "tryton-dev" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton-dev/20180508113943.0176ecdd%40bender.fritz.box. pgpQrUYrmySEm.pgp Description: Digitale Signatur von OpenPGP
Re: [tryton-dev] NSIS new string PreviousInstall
On 08/05/18 09:41, Sergi Almacellas Abellana wrote: El 08/05/18 a les 00:15, Cédric Krier ha escrit: Hi, @translators, I'm working on support automatic uninstallation of previous version on Windows [1]. For that, the string PreviousInstall has changed and must be retranslated: LangString PreviousInstall ${CURLANG} "Tryton is already installed.$\n$\nClick `OK` to remove the previous version or `Cancel` to cancel this upgrade." Catalan: "Tryton ja està instal·lat.$\n$\nPremeu `OK` per eliminar la versió anterior o `Cancel·la` per cancel·lar l'actualització." Spanish: "Tryton ja esta instalado.$\n$\nPulse `OK` para eliminar la versión anterior o `Cancelar` para cancelar la actualitzación." Spanish: "Tryton ya esta instalado.$\n$\nPulse `OK` para eliminar la versión anterior o `Cancelar` para cancelar la actualización." -- You received this message because you are subscribed to the Google Groups "tryton-dev" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton-dev/b425cc83-2f10-9856-8019-c8e9882e7355%40gmail.com.
Re: [tryton-dev] NSIS new string PreviousInstall
Tue, 8 May 2018 00:15:32 +0200 Cédric Krier: >LangString PreviousInstall ${CURLANG} "Tryton is already > installed.$\n$\nClick `OK` to remove the previous version or `Cancel` > to cancel this upgrade." German: "Tryton ist bereits installiert.$\n$\nWählen Sie `OK` um die bisherige Version zu entfernen oder `Abbrechen` um die Aktualisierung abzubrechen." -- Udo Spallek virtual things Preisler & Spallek GbR https://www.virtual-things.biz -- You received this message because you are subscribed to the Google Groups "tryton-dev" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton-dev/20180508103043.3823d510%40bender.fritz.box. pgp7E9wpYYFLA.pgp Description: Digitale Signatur von OpenPGP
Re: [tryton-dev] NSIS new string PreviousInstall
El 08/05/18 a les 00:15, Cédric Krier ha escrit: > Hi, > > @translators, I'm working on support automatic uninstallation of > previous version on Windows [1]. For that, the string PreviousInstall > has changed and must be retranslated: > > LangString PreviousInstall ${CURLANG} "Tryton is already > installed.$\n$\nClick `OK` to remove the previous version or `Cancel` to > cancel this upgrade." Catalan: "Tryton ja està instal·lat.$\n$\nPremeu `OK` per eliminar la versió anterior o `Cancel·la` per cancel·lar l'actualització." Spanish: "Tryton ja esta instalado.$\n$\nPulse `OK` para eliminar la versión anterior o `Cancelar` para cancelar la actualitzación." -- Sergi Almacellas Abellana www.koolpi.com Twitter: @pokoli_srk -- You received this message because you are subscribed to the Google Groups "tryton-dev" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton-dev/75de9126-94bd-02fd-07b1-7ccf730a6a86%40koolpi.com.