[tryton-dev] Restore colors attribute on tree view
Hello World : ) I'm developing an installation using tryton 3.8 to gnuhealth 3 and the client wants to use colors on tree views in appointments and other models. I found that this functionallity was removed as indicated on https://tryton-rietveld.appspot.com/16551002 I tried to restore the color attribute adding back all the removed lines but I'm getting the following error: Traceback (most recent call last): File "/trytond/protocols/jsonrpc.py", line 162, in _marshaled_dispatch response['result'] = dispatch_method(method, params) File "/trytond/protocols/jsonrpc.py", line 191, in _dispatch res = dispatch(*args) File "/trytond/protocols/dispatcher.py", line 162, in dispatch result = rpc.result(meth(*c_args, **c_kwargs)) File "/trytond/model/modelview.py", line 342, in fields_view_get result['field_childs']) File "/trytond/model/modelview.py", line 398, in _view_look_dom_arch for xpath, attribute, value in cls.view_attributes(): TypeError: unbound method view_attributes() must be called with ir.module instance as first argument (got nothing instead) Anyone can help? Thanks in advanced, Carlos -- 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/45d703e8-2d09-4759-884a-3c62866da8cf%40googlegroups.com.
Re: [tryton-dev] Restore colors attribute on tree view
El 30/03/17 a les 13:56, Carlos Ibrahim Arias ha escrit: Hello World : ) I'm developing an installation using tryton 3.8 to gnuhealth 3 and the client wants to use colors on tree views in appointments and other models. Why you don't use icons? The colors were removed in favor of icons. I found that this functionallity was removed as indicated on https://tryton-rietveld.appspot.com/16551002 I tried to restore the color attribute adding back all the removed lines but I'm getting the following error: Traceback (most recent call last): File "/trytond/protocols/jsonrpc.py", line 162, in _marshaled_dispatch response['result'] = dispatch_method(method, params) File "/trytond/protocols/jsonrpc.py", line 191, in _dispatch res = dispatch(*args) File "/trytond/protocols/dispatcher.py", line 162, in dispatch result = rpc.result(meth(*c_args, **c_kwargs)) File "/trytond/model/modelview.py", line 342, in fields_view_get result['field_childs']) File "/trytond/model/modelview.py", line 398, in _view_look_dom_arch for xpath, attribute, value in cls.view_attributes(): TypeError: unbound method view_attributes() must be called with ir.module instance as first argument (got nothing instead) I don't understand why this error is related to the patch. The problem here is that view_attributes must be a classmethod, but you have one which is defined as instance method. -- 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/3935b79b-197b-5c25-14c6-54b32f301ad5%40koolpi.com.
Re: [tryton-dev] Restore colors attribute on tree view
On 2017-03-30 04:56, Carlos Ibrahim Arias wrote: > I tried to restore the color attribute adding back all the removed lines > but I'm getting the following error: > > Anyone can help? I doubt you will find any help to restore a feature that was decided to remove. Instead I can suggest you to use icons instead of colors. They are better for accessibility because they are readable for blind people and they can express an exact meaning. -- 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/20170330130128.GW6408%40tetsuo.
Re: [tryton-dev] Restore colors attribute on tree view
I understand that this function has been deprecated and removed from the code but the point is that there are final users for whom this is a requirement. We should give them the possibility to chose what they want for their usability and accessibility if they consider is good for them. In this case the final user is demanding this option. Please help me to fullfill his requirement. I restored all the removed code indicated at the changeset http://hg.tryton.org/trytond/rev/f21ba9c81eb6, but when adding the following @classmethod for testing to the class Appointment the elements in the tree view are in black color, and they should be in red color. @classmethod def view_attributes(cls): return [('/tree', 'colors', 'red')] Thanks in advanced El jueves, 30 de marzo de 2017, 14:05:05 (UTC+1), Cédric Krier escribió: > > On 2017-03-30 04:56, Carlos Ibrahim Arias wrote: > > I tried to restore the color attribute adding back all the removed lines > > but I'm getting the following error: > > > > Anyone can help? > > I doubt you will find any help to restore a feature that was decided to > remove. Instead I can suggest you to use icons instead of colors. They > are better for accessibility because they are readable for blind people > and they can express an exact meaning. > > -- > Cédric Krier - B2CK SPRL > Email/Jabber: cedric...@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/3ba7bf01-dd4e-4775-ae81-a02d04f7056f%40googlegroups.com.
Re: [tryton-dev] Restore colors attribute on tree view
hi Carlos, I'm agree about colors. I share our patchs about 3.8 release to apply colors. (tryton and trytond). https://bitbucket.org/zikzakmedia/tryton-patchs/src/9ae7fb406211ad246811d21e235820fec44bb29b/trytond-8d300968654d.patch?at=3.8&fileviewer=file-view-default https://bitbucket.org/zikzakmedia/tryton-patchs/src/9ae7fb406211ad246811d21e235820fec44bb29b/tryton-26c3d416b23b.patch?at=3.8&fileviewer=file-view-default El dia 10/04/2017 20.55, "Carlos Ibrahim Arias" va escriure: I understand that this function has been deprecated and removed from the code but the point is that there are final users for whom this is a requirement. We should give them the possibility to chose what they want for their usability and accessibility if they consider is good for them. In this case the final user is demanding this option. Please help me to fullfill his requirement. I restored all the removed code indicated at the changeset http://hg.tryton.org/trytond/rev/f21ba9c81eb6, but when adding the following @classmethod for testing to the class Appointment the elements in the tree view are in black color, and they should be in red color. @classmethod def view_attributes(cls): return [('/tree', 'colors', 'red')] This code show all lines in red color. See other example: list modules and installed. https://bitbucket.org/zikzakmedia/tryton-patchs/src/9ae7fb406211ad246811d21e235820fec44bb29b/trytond-5ac78f0a49c7.patch?at=3.8&fileviewer=file-view-default Are you patched the client (tryton) and trytond? Regards. -- 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/CAN2HbXXORfEFxhpPGKhOVunXobYsF_zzx3euMKdOkOOahR6mrw%40mail.gmail.com.