On 2017-03-09 18:21, Ul wrote: > Am 09.03.2017 um 16:02 schrieb Cédric Krier: > > On 2017-03-09 15:25, Ul wrote: > >> Am 09.03.2017 um 13:52 schrieb Ul: > >>> Hello, > >>> > >>> I don't know if i found a bug or made a subtle mistake: > >>> > >>> I wrote a small module to have list prices and cost prices stored in the > >>> product not just in the template. > >>> If i install or update the module with trytond-admin it works fine, but > >>> when i update any module with the client, it gets broken and the prices > >>> are greyed out in the product(variant) form again. when i update my > >>> module with trytond-admin again it works again. > >> i just found out, that restarting the server does th job too. > >> so if i update any module from the client the prises don't work any > >> more, after restart of the server it works again. > >> I never before had to restart the server after module update, so there > >> is still something odd, but it has to be a problem in the server memory. > > > > It is probably because of the cache in on both side trytond and tryton. > > Especially the view definition which is cached on both side. > > > > Indeed I think you got in a special case where your module change the > > Model definition without changing the XML view. So the previous view > > definition stayed in the cache (nothing triggered its refresh). > The strange thing is, that it does not work anymore if i update a > completely independent module. For example: > 1. everything is working all right > 2. i update stock_lot with the client interface > 3. the prices in the product are grayed out and show the prices of the > template > 4. i restart the server > 5. eyerything works fine again
Humm, it is more and more interesting. I think the problem relies in the fact that when updating the pool call __setup__ after each module but when started normally the __setup__ is only called once. So the _no_template_field is not always filled when __setup__ is called. But normally the Product.__setup__ should not override existing field. By the way, you do not need to your fields in _no_template_field, this is only for field that should not be duplicate are not defined on Product. -- Cédric Krier - B2CK SPRL Email/Jabber: [email protected] Tel: +32 472 54 46 59 Website: http://www.b2ck.com/ -- You received this message because you are subscribed to the Google Groups "tryton" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton/20170309182236.GC87763%40tetsuo.
