[tryton-dev] trytond: Skip empty arch when searching other strings of same model (issue397006)
Reviewers: , Please review this at http://codereview.tryton.org/397006/ Affected files: M trytond/ir/ui/view.py Index: trytond/ir/ui/view.py === --- a/trytond/ir/ui/view.py +++ b/trytond/ir/ui/view.py @@ -140,7 +140,10 @@ ('module', '=', view.module), ]) for view2 in self.browse(view_ids): -tree2 = etree.fromstring(view2.arch) +xml2 = view2.arch.strip() +if not xml2: +continue +tree2 = etree.fromstring(xml2) root2_element = tree2.getroottree().getroot() strings += self._translate_view(root2_element) if not strings: -- tryton-dev@googlegroups.com mailing list
[tryton-dev] Tryton: Add context transaction to reports for issue2656 (issue399003)
Reviewers: , Please review this at http://codereview.tryton.org/399003/ Affected files: M tryton/gui/window/form.py Index: tryton/gui/window/form.py === --- a/tryton/gui/window/form.py +++ b/tryton/gui/window/form.py @@ -521,7 +521,7 @@ 'id': record_id, 'ids': record_ids, } -Action._exec_action(action, data, {}) +Action._exec_action(action, data, self.context) def activate_save(self): self.buttons['save'].props.sensitive = self.screen.modified() -- tryton-dev@googlegroups.com mailing list
[tryton-dev] Re: Test upload.py (issue390003)
Please ignore this mail, I found a bug in 'upload.py' and I am trying solved, sorry don't occur again. 2012/6/15 oscar.alvarez.mont...@gmail.com Reviewers: , Please review this at http://codereview.tryton.org/**390003/http://codereview.tryton.org/390003/ Affected files: M tryton/gui/window/form.py Index: tryton/gui/window/form.py ==**==**=== --- a/tryton/gui/window/form.py +++ b/tryton/gui/window/form.py @@ -521,7 +521,7 @@ 'id': record_id, 'ids': record_ids, } -Action._exec_action(action, data, {}) +Action._exec_action(action, data, self.context) def activate_save(self): self.buttons['save'].props.**sensitive = self.screen.modified() -- tryton-dev@googlegroups.com mailing list
[tryton-dev] company_work_time: Active Record (issue397007)
Reviewers: , Please review this at http://codereview.tryton.org/397007/ Affected files: M __init__.py M company.py M res.py Index: __init__.py === --- a/__init__.py +++ b/__init__.py @@ -1,5 +1,13 @@ #This file is part of Tryton. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. +from trytond.pool import Pool from .company import * from .res import * + + +def register(): +Pool.register( +Company, +User, +module='company_work_time', type_='model') Index: company.py === --- a/company.py +++ b/company.py @@ -1,27 +1,33 @@ #This file is part of Tryton. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. -Company -from trytond.model import ModelView, ModelSQL, fields +from trytond.model import fields +from trytond.pool import PoolMeta -class Company(ModelSQL, ModelView): -_name = 'company.company' +__all__ = ['Company'] +__metaclass__ = PoolMeta + + +class Company: +__name__ = 'company.company' hours_per_work_day = fields.Float(Hours per Work Day, required=True) hours_per_work_week = fields.Float(Hours per Work Week, required=True) hours_per_work_month = fields.Float(Hours per Work Month, required=True) hours_per_work_year = fields.Float(Hours per Work Year, required=True) -def default_hours_per_work_day(self): +@staticmethod +def default_hours_per_work_day(): return 8 -def default_hours_per_work_week(self): +@staticmethod +def default_hours_per_work_week(): return 40 -def default_hours_per_work_month(self): +@staticmethod +def default_hours_per_work_month(): return 160 -def default_hours_per_work_year(self): +@staticmethod +def default_hours_per_work_year(): return 1920 - -Company() Index: res.py === --- a/res.py +++ b/res.py @@ -1,13 +1,18 @@ #This file is part of Tryton. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. -from trytond.model import ModelView, ModelSQL +from trytond.pool import PoolMeta -class User(ModelSQL, ModelView): -_name = 'res.user' +__all__ = ['User'] +__metaclass__ = PoolMeta -def _get_preferences(self, user, context_only=False): -res = super(User, self)._get_preferences(user, + +class User: +__name__ = 'res.user' + +@classmethod +def _get_preferences(cls, user, context_only=False): +res = super(User, cls)._get_preferences(user, context_only=context_only) if user.company: res['company_work_time'] = { @@ -17,5 +22,3 @@ 'd': user.company.hours_per_work_day, } return res - -User() -- tryton-dev@googlegroups.com mailing list
[tryton-dev] tryton: Don't fail on unknow font family (issue399004)
Reviewers: , Please review this at http://codereview.tryton.org/399004/ Affected files: M tryton/gui/window/view_form/view/form_gtk/richtextbox.py Index: tryton/gui/window/view_form/view/form_gtk/richtextbox.py === --- a/tryton/gui/window/view_form/view/form_gtk/richtextbox.py +++ b/tryton/gui/window/view_form/view/form_gtk/richtextbox.py @@ -145,8 +145,10 @@ } self.tools['size'].child.set_active(self.sizes.index( self.current_font_prop['size'])) -self.tools['font_family'].child.set_active(self.families.index( -self.current_font_prop['font_family'])) +font_family = self.current_font_prop['font_family'] +if font_family in self.families: +self.tools['font_family'].child.set_active(self.families.index( +font_family)) self.start_tags = {} self.end_tags = {} # Connect events -- tryton-dev@googlegroups.com mailing list
Re: [tryton] HTTP server
On 10/06/12 16:57 +0200, Cédric Krier wrote: Hi, I have to reboot plato (the host where the demo and unittest are running) to update the kernel. I have to setup an initramfs because of the new udev. I have no expected time for this but normally it should be back soon. I will sent an email when it is done. Idem but for moretus which runs: - www/bugs - irclog - hg -- Cédric Krier B2CK SPRL Rue de Rotterdam, 4 4000 Liège Belgium Tel: +32 472 54 46 59 Email/Jabber: cedric.kr...@b2ck.com Website: http://www.b2ck.com/ pgpunpU5Kdkqs.pgp Description: PGP signature
Re: [tryton] Many2One widget with new disable
On 10/06/12 15:02 -0700, guly200 wrote: Is it possible and how can I display a Many2One field with the new button disabled ie with just the magnifier so that I can force users on a view to choose from the existing records and not create a new one ? I have started a patch for that: http://codereview.tryton.org/389003/ http://codereview.tryton.org/398002/ But otherwise, you can remove the create access but with version = 2.4 the button will not be disable. -- Cédric Krier B2CK SPRL Rue de Rotterdam, 4 4000 Liège Belgium Tel: +32 472 54 46 59 Email/Jabber: cedric.kr...@b2ck.com Website: http://www.b2ck.com/ pgpzx1kyMmuPS.pgp Description: PGP signature
Re: [tryton] Secondary Units in Tryton
On 14/06/12 16:28 -0300, Lucho Rossi wrote: Hello, I work in gcoop[0] and we start using tryton a few weeks ago. We are using it to create a system of budgeting for Printing. Today our problem is that the system should buy Kilograms of paper, but sell sheets of paper. As far as we could see, the units of conversion work in the same category. Is there any module like Secondary Units[1] of OpenERP in tryton? If not, any idea on how to write it? This sounds like production ? Otherwise you can create a new group of unit of measure that will contains Kg of Paper and Sheet of Paper. -- Cédric Krier B2CK SPRL Rue de Rotterdam, 4 4000 Liège Belgium Tel: +32 472 54 46 59 Email/Jabber: cedric.kr...@b2ck.com Website: http://www.b2ck.com/ pgpKf0h6YS3E9.pgp Description: PGP signature
[tryton] Re: Many2One widget with new disable
On Sunday, June 10, 2012 3:02:36 PM UTC-7, guly200 wrote: Is it possible and how can I display a Many2One field with the new button disabled ie with just the magnifier so that I can force users on a view to choose from the existing records and not create a new one ? Hi, in the form view declaration, use the selection widget instead of the many2one. Here's a link to the docs for further reference: http://doc.tryton.org/2.4/trytond/doc/topics/views/index.html Hope it helps -- tryton@googlegroups.com mailing list
Re: [tryton] HTTP server
On 15/06/12 08:10 +0200, Cédric Krier wrote: On 10/06/12 16:57 +0200, Cédric Krier wrote: Hi, I have to reboot plato (the host where the demo and unittest are running) to update the kernel. I have to setup an initramfs because of the new udev. I have no expected time for this but normally it should be back soon. I will sent an email when it is done. Idem but for moretus which runs: - www/bugs - irclog - hg It is back. -- Cédric Krier B2CK SPRL Rue de Rotterdam, 4 4000 Liège Belgium Tel: +32 472 54 46 59 Email/Jabber: cedric.kr...@b2ck.com Website: http://www.b2ck.com/ pgpFhzAqhXlLm.pgp Description: PGP signature
[tryton] socket error 98 when i start trytond from terminal
hi, pls am new to gnu health...i try to install following the wikibook direction but whenever i try to start trytond server i receive the following error at the end of the day...please i need some1 to come to my aid. thanks File /usr/lib/python2.7/SocketServer.py, line 408, in __init__ self.server_bind() File /usr/lib/python2.7/dist-packages/trytond/protocols/ jsonrpc.py, line 249, in server_bind SimpleJSONRPCServer.server_bind(self) File /usr/lib/python2.7/SocketServer.py, line 419, in server_bind self.socket.bind(self.server_address) File /usr/lib/python2.7/socket.py, line 224, in meth return getattr(self._sock,name)(*args) socket.error: [Errno 98] Address already in use -- tryton@googlegroups.com mailing list
Re: [tryton] socket error 98 when i start trytond from terminal
Le Fri, 15 Jun 2012 02:12:58 -0700 (PDT), surajra...@yahoo.com surajra...@yahoo.com a écrit : hi, pls am new to gnu health...i try to install following the wikibook direction but whenever i try to start trytond server i receive the following error at the end of the day...please i need some1 to come to my aid. thanks File /usr/lib/python2.7/SocketServer.py, line 408, in __init__ self.server_bind() File /usr/lib/python2.7/dist-packages/trytond/protocols/ jsonrpc.py, line 249, in server_bind SimpleJSONRPCServer.server_bind(self) File /usr/lib/python2.7/SocketServer.py, line 419, in server_bind self.socket.bind(self.server_address) File /usr/lib/python2.7/socket.py, line 224, in meth return getattr(self._sock,name)(*args) socket.error: [Errno 98] Address already in use This means that the server is already running (or that there is another process using the same port). To find the trytond process, you can use: ps aux | grep trytond To check who is using the port: netstat -pant | grep 8000 hth -- Bertrand Chenal B2CK SPRL Rue de Rotterdam, 4 4000 Liège Belgium Email: bertrand.che...@b2ck.com Website: http://www.b2ck.com/ -- -- tryton@googlegroups.com mailing list
[tryton] Re: socket error 98 when i start trytond from terminal
thank you for your replyi got the following when i use those command does it mean the port is been used by trytond? nd pls how do i edit the trytond-conf file, lastly please if thres other tutorial on how to install gnu health apart from wikibook i will be glad if u can help me with it. mintserver@mintserver-PowerEdge-T100 ~ $ sudo ps aux | grep trytond tryton1014 0.0 0.6 42444 21268 ?Sl 13:34 0:01 /usr/bin/python /usr/bin/trytond --config=/etc/trytond.conf --logfile=/var/log/tryton/trytond.log 1000 2980 0.0 0.0 4372 828 pts/0S+ 14:50 0:00 grep --colour=auto trytond mintserver@mintserver-PowerEdge-T100 ~ $ netstat -pant | grep 8000 (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) tcp0 0 127.0.0.1:8000 0.0.0.0:* LISTEN - On Friday, 15 June 2012 10:12:58 UTC+1, suraj...@yahoo.com wrote: hi, pls am new to gnu health...i try to install following the wikibook direction but whenever i try to start trytond server i receive the following error at the end of the day...please i need some1 to come to my aid. thanks File /usr/lib/python2.7/SocketServer.py, line 408, in __init__ self.server_bind() File /usr/lib/python2.7/dist-packages/trytond/protocols/ jsonrpc.py, line 249, in server_bind SimpleJSONRPCServer.server_bind(self) File /usr/lib/python2.7/SocketServer.py, line 419, in server_bind self.socket.bind(self.server_address) File /usr/lib/python2.7/socket.py, line 224, in meth return getattr(self._sock,name)(*args) socket.error: [Errno 98] Address already in use On Friday, 15 June 2012 10:12:58 UTC+1, suraj...@yahoo.com wrote: hi, pls am new to gnu health...i try to install following the wikibook direction but whenever i try to start trytond server i receive the following error at the end of the day...please i need some1 to come to my aid. thanks File /usr/lib/python2.7/SocketServer.py, line 408, in __init__ self.server_bind() File /usr/lib/python2.7/dist-packages/trytond/protocols/ jsonrpc.py, line 249, in server_bind SimpleJSONRPCServer.server_bind(self) File /usr/lib/python2.7/SocketServer.py, line 419, in server_bind self.socket.bind(self.server_address) File /usr/lib/python2.7/socket.py, line 224, in meth return getattr(self._sock,name)(*args) socket.error: [Errno 98] Address already in use On Friday, 15 June 2012 10:12:58 UTC+1, suraj...@yahoo.com wrote: hi, pls am new to gnu health...i try to install following the wikibook direction but whenever i try to start trytond server i receive the following error at the end of the day...please i need some1 to come to my aid. thanks File /usr/lib/python2.7/SocketServer.py, line 408, in __init__ self.server_bind() File /usr/lib/python2.7/dist-packages/trytond/protocols/ jsonrpc.py, line 249, in server_bind SimpleJSONRPCServer.server_bind(self) File /usr/lib/python2.7/SocketServer.py, line 419, in server_bind self.socket.bind(self.server_address) File /usr/lib/python2.7/socket.py, line 224, in meth return getattr(self._sock,name)(*args) socket.error: [Errno 98] Address already in use On Friday, 15 June 2012 10:12:58 UTC+1, suraj...@yahoo.com wrote: hi, pls am new to gnu health...i try to install following the wikibook direction but whenever i try to start trytond server i receive the following error at the end of the day...please i need some1 to come to my aid. thanks File /usr/lib/python2.7/SocketServer.py, line 408, in __init__ self.server_bind() File /usr/lib/python2.7/dist-packages/trytond/protocols/ jsonrpc.py, line 249, in server_bind SimpleJSONRPCServer.server_bind(self) File /usr/lib/python2.7/SocketServer.py, line 419, in server_bind self.socket.bind(self.server_address) File /usr/lib/python2.7/socket.py, line 224, in meth return getattr(self._sock,name)(*args) socket.error: [Errno 98] Address already in use On Friday, 15 June 2012 10:12:58 UTC+1, suraj...@yahoo.com wrote: hi, pls am new to gnu health...i try to install following the wikibook direction but whenever i try to start trytond server i receive the following error at the end of the day...please i need some1 to come to my aid. thanks File /usr/lib/python2.7/SocketServer.py, line 408, in __init__ self.server_bind() File /usr/lib/python2.7/dist-packages/trytond/protocols/ jsonrpc.py, line 249, in server_bind SimpleJSONRPCServer.server_bind(self) File /usr/lib/python2.7/SocketServer.py, line 419, in server_bind self.socket.bind(self.server_address) File /usr/lib/python2.7/socket.py, line 224, in meth return getattr(self._sock,name)(*args) socket.error: [Errno 98] Address already in use -- tryton@googlegroups.com mailing list
[tryton] Tryton Tutorial or ebook
Is there any tutorial or ebook (pdf ) is available for tryton installation, Modules , Trouble shooting, Version control etc ? -- tryton@googlegroups.com mailing list