* [email protected] [2017-07-28 19:44 +0200]:
Hi,
Hello,
2. I add similar fields to SaleLine:
# trytond/trytond/modules/symetrie/__init__.py
from trytond.pool import Pool
from party import *
from sale import *
def register():
Pool.register(
Party,
SaleLine,
module='symetrie', type_='model')
…
[1] : complet output of trytond-admin -u :
…
65271 140735242597136 [2017-07-28 17:10:49,457] INFO trytond.modules
symetrie:registering classes
…
65271 140735242597136 [2017-07-28 17:10:54,246] INFO trytond.modules symetrie
65271 140735242597136 [2017-07-28 17:10:54,246] INFO trytond.pool setup pool for
"t44_2"
65271 140735242597136 [2017-07-28 17:10:54,250] INFO trytond.modules
symetrie:register party.party
Are you sure that the module that is used by tryton (as you can see
above) is the one where you have done your changes?
(Maybe you could add a print in the register function so that you know
you're actually running this code).
Another possibility would be that "from sale import *" imports
something else. We usually write "from . import sale" to make it
obvious that you're importing from the current directory.
--
Nicolas Évrard - B2CK SPRL
E-mail/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/20170728180324.v5ic63bmtd5336mx%40localhost.localdomain.