Re: [tryton] selection field
Il giorno lunedì 18 dicembre 2017 17:27:03 UTC+1, Mark Shane Hayden ha scritto: > On Dec 18, 2017 04:08, "Cato Nano"wrote: > Now that a list of entities represented by my model get correctly shown, I > want to add a selection field to my model. Like this > > > > > > tipo = fields.Selection('tipo', [ > > ('M', 'Male') > > ('F', 'Female') > > ], > > ) > > > You need to separate your tuples with commas in the selection list like this: > ('M', 'Male), > ('F', 'Female') > > > without the comma it looks to the Python interpreter like the second tuple is > parameters and the first tuple is a function hence the error. > > > > > > I copied this from the manual, here > > http://doc.tryton.org/4.6/trytond/doc/ref/models/fields.html#ref-models-fields > > > > when updating the module like this > > > > :~/tributi$ sudo python3 setup.py develop > > :~/tributi$ sudo trytond-admin -c /etc/tryton/trytond.conf -d tryton -u > tributi > > > > > > > > i get this error > > > > > > > > > > Traceback (most recent call last): > > File "/usr/bin/trytond-admin", line 21, in > > admin.run(options) > > File "/usr/lib/python3/dist-packages/trytond/admin.py", line 54, in run > > installdeps=options.installdeps) > > File "/usr/lib/python3/dist-packages/trytond/pool.py", line 142, in init > > self.start() > > File "/usr/lib/python3/dist-packages/trytond/pool.py", line 95, in start > > register_classes() > > File "/usr/lib/python3/dist-packages/trytond/modules/__init__.py", line > 373, in register_classes > > mod_file, pathname, description) > > File "/usr/lib/python3.6/imp.py", line 245, in load_module > > return load_package(name, filename) > > File "/usr/lib/python3.6/imp.py", line 217, in load_package > > return _load(spec) > > File "", line 684, in _load > > File "", line 665, in _load_unlocked > > File "", line 678, in exec_module > > File "", line 219, in _call_with_frames_removed > > File "/home/admin/tributi/build/lib/trytond/modules/tributi/__init__.py", > line 2, in > > from .bolletta import Bolletta > > File "/home/admin/tributi/build/lib/trytond/modules/tributi/bolletta.py", > line 6, in > > class Bolletta(ModelSQL, ModelView): > > File "/home/admin/tributi/build/lib/trytond/modules/tributi/bolletta.py", > line 13, in Bolletta > > ('F', 'Female') > > TypeError: 'tuple' object is not callable > > > > > > Thanks in advance ! > > > > -- > > 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/8ddc439a-f4cb-49bc-a5aa-09d7e4201e58%40googlegroups.com. thank you people I managed to make it work I found a selection field in the "sales" module and copied that code and adapted it Thats how I discovered that the options list ought to be the first argument For now I have no "form" view for my bolletta so I can t test the drop down menu But the field shows up in a tree view, so I guess it s ok Thanks ! -- 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/a36d7bc2-2a27-4ff6-8f53-fba5f1e5279a%40googlegroups.com.
Re: [tryton] merge invoices
Le 18/12/2017 à 20:11, Cédric Krier a écrit : On 2017-12-18 20:06, Richard PALO wrote: Having a number of suppliers which group multiple deliveries in one invoice, with OpenERP (aka Odoo) we've been using account_invoice_merge extensively. Maybe missing something but haven't seem to have found the equivalent in tryton. Any hints? The module purchase_invoice_line_standalone manages that perfectly. Perhaps I'm still missing something. Now it seems the invoices are no longer created upon reception of the supplier shipment! (though invoice method is still 'Based On Shipment') I notice that I can manually create an invoice and subsequently select what appears to be PO lines (with no shipment nor PO indication)... but that will add enormous amount of time/energy/confusion to current processing. I try to select the shipments to see if there is an action to create an invoice on them to no avail... That would be the easiest (with a comment header introducing each shipment). On a sidenote, from a shipment, there seems to be no indication of the purchase order which should probably be the origin (to give context as to what products are expected)... and I can't seem to find a way to select the product moves from the Shipments Tab of the Purchase Order and create a shipment prefilled either... Once established manually a shipment, it seem impossible to navigate from the supplier shipment to the purchase order, though the inverse is visible on the Shipments Tab. Does it exist documentation to map, for migration purposes, openerp purchase workflows to tryton workflows? This is somewhat the critical path. -- Richard PALO -- 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/ef5bd18c-9bb2-0e6f-ec99-f3c14fa1130f%40free.fr.
Re: [tryton] merge invoices
On 2017-12-18 20:06, Richard PALO wrote: > Having a number of suppliers which group multiple deliveries > in one invoice, with OpenERP (aka Odoo) we've been using > account_invoice_merge extensively. > > Maybe missing something but haven't seem to have found the equivalent > in tryton. Any hints? The module purchase_invoice_line_standalone manages that perfectly. -- 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" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton/20171218191136.GJ8635%40kei.
[tryton] merge invoices
Having a number of suppliers which group multiple deliveries in one invoice, with OpenERP (aka Odoo) we've been using account_invoice_merge extensively. Maybe missing something but haven't seem to have found the equivalent in tryton. Any hints? cheers, -- Richard PALO -- 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/5bed07e2-e32c-c0cc-28fe-0ef1a8a47a8b%40free.fr.
Re: [tryton] selection field
On Dec 18, 2017 04:08, "Cato Nano"wrote: Now that a list of entities represented by my model get correctly shown, I want to add a selection field to my model. Like this tipo = fields.Selection('tipo', [ ('M', 'Male') ('F', 'Female') ], ) You need to separate your tuples with commas in the selection list like this: ('M', 'Male), ('F', 'Female') without the comma it looks to the Python interpreter like the second tuple is parameters and the first tuple is a function hence the error. I copied this from the manual, here http://doc.tryton.org/4.6/trytond/doc/ref/models/fields. html#ref-models-fields when updating the module like this :~/tributi$ sudo python3 setup.py develop :~/tributi$ sudo trytond-admin -c /etc/tryton/trytond.conf -d tryton -u tributi i get this error Traceback (most recent call last): File "/usr/bin/trytond-admin", line 21, in admin.run(options) File "/usr/lib/python3/dist-packages/trytond/admin.py", line 54, in run installdeps=options.installdeps) File "/usr/lib/python3/dist-packages/trytond/pool.py", line 142, in init self.start() File "/usr/lib/python3/dist-packages/trytond/pool.py", line 95, in start register_classes() File "/usr/lib/python3/dist-packages/trytond/modules/__init__.py", line 373, in register_classes mod_file, pathname, description) File "/usr/lib/python3.6/imp.py", line 245, in load_module return load_package(name, filename) File "/usr/lib/python3.6/imp.py", line 217, in load_package return _load(spec) File "", line 684, in _load File "", line 665, in _load_unlocked File "", line 678, in exec_module File "", line 219, in _call_with_frames_removed File "/home/admin/tributi/build/lib/trytond/modules/tributi/__init__.py", line 2, in from .bolletta import Bolletta File "/home/admin/tributi/build/lib/trytond/modules/tributi/bolletta.py", line 6, in class Bolletta(ModelSQL, ModelView): File "/home/admin/tributi/build/lib/trytond/modules/tributi/bolletta.py", line 13, in Bolletta ('F', 'Female') TypeError: 'tuple' object is not callable Thanks in advance ! -- 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/8ddc439a-f4cb-49bc-a5aa-09d7e4201e58%40googlegroups.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/CAJ0%2BmOr%2BtLKV8_d47iPZA5YVMyPKTfBaequtSZWOGq4k8-FFVg%40mail.gmail.com.
[tryton] Re: selection field
El lunes, 18 de diciembre de 2017, 12:08:55 (UTC+1), Cato Nano escribió: > Now that a list of entities represented by my model get correctly shown, I > want to add a selection field to my model. Like this > > > tipo = fields.Selection('tipo', [ > ('M', 'Male') > ('F', 'Female') > ], > ) > > > > I copied this from the manual, here > http://doc.tryton.org/4.6/trytond/doc/ref/models/fields.html#ref-models-fields > > when updating the module like this > > :~/tributi$ sudo python3 setup.py develop > :~/tributi$ sudo trytond-admin -c /etc/tryton/trytond.conf -d tryton -u > tributi > > > > i get this error > > > > > Traceback (most recent call last): > File "/usr/bin/trytond-admin", line 21, in > admin.run(options) > File "/usr/lib/python3/dist-packages/trytond/admin.py", line 54, in run > installdeps=options.installdeps) > File "/usr/lib/python3/dist-packages/trytond/pool.py", line 142, in init > self.start() > File "/usr/lib/python3/dist-packages/trytond/pool.py", line 95, in start > register_classes() > File "/usr/lib/python3/dist-packages/trytond/modules/__init__.py", line > 373, in register_classes > mod_file, pathname, description) > File "/usr/lib/python3.6/imp.py", line 245, in load_module > return load_package(name, filename) > File "/usr/lib/python3.6/imp.py", line 217, in load_package > return _load(spec) > File "", line 684, in _load > File "", line 665, in _load_unlocked > File "", line 678, in exec_module > File "", line 219, in _call_with_frames_removed > File "/home/admin/tributi/build/lib/trytond/modules/tributi/__init__.py", > line 2, in > from .bolletta import Bolletta > File "/home/admin/tributi/build/lib/trytond/modules/tributi/bolletta.py", > line 6, in > class Bolletta(ModelSQL, ModelView): > File "/home/admin/tributi/build/lib/trytond/modules/tributi/bolletta.py", > line 13, in Bolletta > ('F', 'Female') > TypeError: 'tuple' object is not callable > > > Thanks in advance ! First param is the options, second the label i think ... -- 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/ee9020b4-27ce-4c34-ba1e-441a1f3654bf%40googlegroups.com.
[tryton] selection field
Now that a list of entities represented by my model get correctly shown, I want to add a selection field to my model. Like this tipo = fields.Selection('tipo', [ ('M', 'Male') ('F', 'Female') ], ) I copied this from the manual, here http://doc.tryton.org/4.6/trytond/doc/ref/models/fields.html#ref-models-fields when updating the module like this :~/tributi$ sudo python3 setup.py develop :~/tributi$ sudo trytond-admin -c /etc/tryton/trytond.conf -d tryton -u tributi i get this error Traceback (most recent call last): File "/usr/bin/trytond-admin", line 21, in admin.run(options) File "/usr/lib/python3/dist-packages/trytond/admin.py", line 54, in run installdeps=options.installdeps) File "/usr/lib/python3/dist-packages/trytond/pool.py", line 142, in init self.start() File "/usr/lib/python3/dist-packages/trytond/pool.py", line 95, in start register_classes() File "/usr/lib/python3/dist-packages/trytond/modules/__init__.py", line 373, in register_classes mod_file, pathname, description) File "/usr/lib/python3.6/imp.py", line 245, in load_module return load_package(name, filename) File "/usr/lib/python3.6/imp.py", line 217, in load_package return _load(spec) File "", line 684, in _load File "", line 665, in _load_unlocked File "", line 678, in exec_module File "", line 219, in _call_with_frames_removed File "/home/admin/tributi/build/lib/trytond/modules/tributi/__init__.py", line 2, in from .bolletta import Bolletta File "/home/admin/tributi/build/lib/trytond/modules/tributi/bolletta.py", line 6, in class Bolletta(ModelSQL, ModelView): File "/home/admin/tributi/build/lib/trytond/modules/tributi/bolletta.py", line 13, in Bolletta ('F', 'Female') TypeError: 'tuple' object is not callable Thanks in advance ! -- 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/8ddc439a-f4cb-49bc-a5aa-09d7e4201e58%40googlegroups.com.
Re: [tryton] Re: a simple view
Il giorno lunedì 18 dicembre 2017 00:05:07 UTC+1, Cédric Krier ha scritto: > On 2017-12-17 14:31, Cato Nano wrote: > > Il giorno domenica 17 dicembre 2017 19:35:09 UTC+1, Cédric Krier ha scritto: > > > > > > > > You did not register in the Pool you model in __init__.py > > > Also I just see that the file bolletta.py has syntax errors. > > > > Sorry to bother with such trivial issues :-/ > > > > Anyway, I didn' t register my model in __init__.py because this doc > > http://doc.tryton.org/4.6/trytond/doc/topics/models/index.html#topics-models > > > > doesn' t mention __init__.py > > https://codereview.tryton.org/43841002 Thank you ! Now I am creating my first selection field and I have some troubles with that too I ll open a new thread for that ! Ciao -- 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/1639711c-ab5a-4a2f-8fd1-2013c7683ee3%40googlegroups.com.