[tryton-dev] account: icons is not a module and use glob syntax in package_data for issue2149 (issue106001)
Reviewers: , Please review this at http://codereview.tryton.org/106001/ Affected files: R icons/__init__.py M setup.py Index: icons/__init__.py === deleted file mode 100644 Index: setup.py === --- a/setup.py +++ b/setup.py @@ -31,15 +31,11 @@ packages=[ 'trytond.modules.account', 'trytond.modules.account.tests', -'trytond.modules.account.icons', ], package_data={ 'trytond.modules.account': info.get('xml', []) \ + info.get('translation', []) \ -+ ['aged_balance.odt', 'general_journal.odt', -'general_ledger.odt', 'third_party_balance.odt', -'trial_balance.odt'], -'trytond.modules.account.icons': ['tryton-financial.svg'], ++ ['*.odt', 'icons/*'], }, classifiers=[ 'Development Status :: 5 - Production/Stable', -- tryton-dev@googlegroups.com mailing list
[tryton-dev] tryton: toolbar cache must be done on the rpc level (issue107001)
Reviewers: , Please review this at http://codereview.tryton.org/107001/ Affected files: M tryton/gui/window/form.py M tryton/rpc.py Index: tryton/gui/window/form.py === --- a/tryton/gui/window/form.py +++ b/tryton/gui/window/form.py @@ -33,7 +33,6 @@ class Form(SignalEvent, TabContent): Form -_toolbar_cache = {} toolbar_def = [ ('new', 'tryton-new', _('New'), _('Create a new record'), 'sig_new'), @@ -150,18 +149,16 @@ gobject.timeout_add(int(auto_refresh) * 1000, self.sig_reload) def get_toolbars(self): -if self.model not in self._toolbar_cache: -ctx = {} -ctx.update(rpc.CONTEXT) -ctx.update(self.context) -args = ('model', self.model, 'view_toolbar_get', ctx) -try: -toolbars = rpc.execute(*args) -except TrytonServerError, exception: -toolbars = common.process_exception(exception, *args) -toolbars = toolbars if toolbars else {} -self._toolbar_cache[self.model] = toolbars -return self._toolbar_cache[self.model] +ctx = {} +ctx.update(rpc.CONTEXT) +ctx.update(self.context) +args = ('model', self.model, 'view_toolbar_get', ctx) +try: +toolbars = rpc.execute(*args) +except TrytonServerError, exception: +toolbars = common.process_exception(exception, *args) +toolbars = toolbars if toolbars else {} +return toolbars def widget_get(self): return self.screen.widget Index: tryton/rpc.py === --- a/tryton/rpc.py +++ b/tryton/rpc.py @@ -21,6 +21,7 @@ _DATABASE = '' CONTEXT = {} _VIEW_CACHE = {} +_TOOLBAR_CACHE = {} TIMEZONE = 'utc' _SEMAPHORE = Semaphore() _CA_CERTS = os.path.join(get_config_dir(), 'ca_certs') @@ -66,7 +67,9 @@ def login(username, password, host, port, database): global CONNECTION, _USER, _USERNAME, _SESSION, _HOST, _PORT, _DATABASE, _VIEW_CACHE +global _TOOLBAR_CACHE _VIEW_CACHE = {} +_TOOLBAR_CACHE = {} try: _SEMAPHORE.acquire() try: @@ -102,6 +105,7 @@ def logout(): global CONNECTION, _USER, _USERNAME, _SESSION, _HOST, _PORT, _DATABASE, _VIEW_CACHE +global _TOOLBAR_CACHE if IPCServer.instance: IPCServer.instance.stop() if CONNECTION is not None: @@ -123,6 +127,7 @@ _PORT = None _DATABASE = '' _VIEW_CACHE = {} +_TOOLBAR_CACHE = {} def context_reload(): global CONTEXT, TIMEZONE, _HOST, _PORT @@ -146,7 +151,8 @@ if CONNECTION is None: raise TrytonServerError('NotLogged') key = False -if args[2] == 'fields_view_get': +method = args[2] +if method == 'fields_view_get': args, ctx = args[:-1], args[-1] # Make sure all the arguments are present args = tuple(arg if arg is not None else default @@ -158,6 +164,10 @@ args += (_VIEW_CACHE[key][0], ctx) else: args += (ctx,) +elif method == 'view_toolbar_get': +key = str(args) +if key in _TOOLBAR_CACHE: +return _TOOLBAR_CACHE[key] res = _SEMAPHORE.acquire(blocking) if not res: return @@ -168,11 +178,13 @@ result = getattr(CONNECTION, name)(*args) finally: _SEMAPHORE.release() -if key: +if key and method == 'fields_view_get': if result is True and key in _VIEW_CACHE: result = _VIEW_CACHE[key][1] else: _VIEW_CACHE[key] = (result['md5'], result) +elif key and method == 'view_toolbar_get': +_TOOLBAR_CACHE[key] = result logging.getLogger('rpc.result').debug(repr(result)) return result -- tryton-dev@googlegroups.com mailing list
[tryton-dev] purchase: remove default read access for issue2067 (issue107002)
Reviewers: , Please review this at http://codereview.tryton.org/107002/ Affected files: M party.xml M purchase.xml Index: party.xml === --- a/party.xml +++ b/party.xml @@ -14,6 +14,11 @@ field name=modelparty.party,0/field field name=action ref=act_purchase_form2/ /record +record model=ir.action-res.group +id=act_purchase_form2-group_purchase +field name=action ref=act_purchase_form2/ +field name=group ref=group_purchase/ +/record /data /tryton Index: purchase.xml === --- a/purchase.xml +++ b/purchase.xml @@ -3,8 +3,6 @@ this repository contains the full copyright notices and license terms. -- tryton data -menuitem name=Purchase id=menu_purchase sequence=4/ - record model=res.group id=group_purchase_admin field name=namePurchase Administrator/field /record @@ -29,6 +27,12 @@ field name=group ref=group_purchase_admin/ /record +menuitem name=Purchase id=menu_purchase sequence=4/ +record model=ir.ui.menu-res.group id=menu_purchase_group_purchase +field name=menu ref=menu_purchase/ +field name=group ref=group_purchase/ +/record + !-- set active for 1.4 migration -- menuitem name=Configuration parent=menu_purchase id=menu_configuration sequence=0 icon=tryton-preferences @@ -282,6 +286,10 @@ /record menuitem parent=menu_purchase action=act_purchase_form id=menu_purchase_form sequence=10/ +record model=ir.ui.menu-res.group id=menu_purchase_form_group_purchase +field name=menu ref=menu_purchase_form/ +field name=group ref=group_purchase/ +/record record model=ir.action.act_window id=act_purchase_form_draft field name=nameDraft Purchases/field @@ -342,7 +350,7 @@ record model=ir.model.access id=access_purchase field name=model search=[('model', '=', 'purchase.purchase')]/ -field name=perm_read eval=True/ +field name=perm_read eval=False/ field name=perm_write eval=False/ field name=perm_create eval=False/ field name=perm_delete eval=False/ @@ -741,10 +749,10 @@ /record record model=ir.model.access id=access_purchase_line field name=model search=[('model', '=', 'purchase.line')]/ -field name=perm_read eval=True/ -field name=perm_write eval=True/ -field name=perm_create eval=True/ -field name=perm_delete eval=True/ +field name=perm_read eval=False/ +field name=perm_write eval=False/ +field name=perm_create eval=False/ +field name=perm_delete eval=False/ /record record model=ir.model.access id=access_purchase_line_purchase field name=model search=[('model', '=', 'purchase.line')]/ @@ -954,5 +962,41 @@ field name=rule_group ref=rule_group_purchase/ /record +record model=ir.model.access id=access_invoice_purchase +field name=model search=[('model', '=', 'account.invoice')]/ +field name=group ref=group_purchase/ +field name=perm_read eval=True/ +field name=perm_write eval=False/ +field name=perm_create eval=False/ +field name=perm_delete eval=False/ +/record + +record model=ir.model.access id=access_invoice_line_purchase +field name=model search=[('model', '=', 'account.invoice.line')]/ +field name=group ref=group_purchase/ +field name=perm_read eval=True/ +field name=perm_write eval=False/ +field name=perm_create eval=False/ +field name=perm_delete eval=False/ +/record + +record model=ir.model.access id=access_move_group_purchase +field name=model search=[('model', '=', 'stock.move')]/ +field name=group ref=group_purchase/ +field name=perm_read eval=True/ +field name=perm_write eval=False/ +field name=perm_create eval=False/ +field name=perm_delete eval=False/ +/record + +record model=ir.model.access id=access_shipment_in_group_purchase +field name=model search=[('model', '=', 'stock.shipment.in')]/ +field name=group ref=group_purchase/ +field name=perm_read eval=True/ +field name=perm_write eval=False/ +field name=perm_create eval=False/ +field name=perm_delete eval=False/ +/record + /data /tryton -- tryton-dev@googlegroups.com mailing list
[tryton-dev] sale_opportunity: remove default read access for issue2067 (issue109002)
Reviewers: , Please review this at http://codereview.tryton.org/109002/ Affected files: M opportunity.xml Index: opportunity.xml === --- a/opportunity.xml +++ b/opportunity.xml @@ -217,6 +217,14 @@ record model=ir.model.access id=access_opportunity field name=model search=[('model', '=', 'sale.opportunity')]/ +field name=perm_read eval=False/ +field name=perm_write eval=False/ +field name=perm_create eval=False/ +field name=perm_delete eval=False/ +/record +record model=ir.model.access id=access_opportunity_sale +field name=model search=[('model', '=', 'sale.opportunity')]/ +field name=group ref=sale.group_sale/ field name=perm_read eval=True/ field name=perm_write eval=False/ field name=perm_create eval=False/ @@ -367,10 +375,18 @@ record model=ir.model.access id=access_opportunity_line field name=model search=[('model', '=', 'sale.opportunity.line')]/ +field name=perm_read eval=False/ +field name=perm_write eval=False/ +field name=perm_create eval=False/ +field name=perm_delete eval=False/ +/record +record model=ir.model.access id=access_opportunity_line_sale +field name=model search=[('model', '=', 'sale.opportunity.line')]/ +field name=group ref=sale.group_sale/ field name=perm_read eval=True/ -field name=perm_write eval=True/ -field name=perm_create eval=True/ -field name=perm_delete eval=True/ +field name=perm_write eval=False/ +field name=perm_create eval=False/ +field name=perm_delete eval=False/ /record record model=ir.model.access id=access_opportunity_line_opportunity field name=model search=[('model', '=', 'sale.opportunity.line')]/ @@ -449,10 +465,18 @@ record model=ir.model.access id=access_opportunity_history field name=model search=[('model', '=', 'sale.opportunity.history')]/ +field name=perm_read eval=False/ +field name=perm_write eval=False/ +field name=perm_create eval=False/ +field name=perm_delete eval=False/ +/record +record model=ir.model.access id=access_opportunity_history_sale +field name=model search=[('model', '=', 'sale.opportunity.history')]/ +field name=group ref=sale.group_sale/ field name=perm_read eval=True/ -field name=perm_write eval=True/ -field name=perm_create eval=True/ -field name=perm_delete eval=True/ +field name=perm_write eval=False/ +field name=perm_create eval=False/ +field name=perm_delete eval=False/ /record record model=ir.model.access id=access_opportunity_history_opportunity field name=model search=[('model', '=', 'sale.opportunity.history')]/ -- tryton-dev@googlegroups.com mailing list
[tryton-dev] stock: remove default read access for issue2067 (issue109003)
Reviewers: , Please review this at http://codereview.tryton.org/109003/ Affected files: M configuration.xml M inventory.xml M move.xml M party.xml M period.xml M product.xml M shipment.xml M stock.xml Index: configuration.xml === --- a/configuration.xml +++ b/configuration.xml @@ -72,5 +72,22 @@ field name=value eval='ir.sequence,' + str(ref('sequence_shipment_internal'))/ /record +record model=ir.model.access id=access_configuration +field name=model search=[('model', '=', 'stock.configuration')]/ +field name=perm_read eval=True/ +field name=perm_write eval=False/ +field name=perm_create eval=False/ +field name=perm_delete eval=False/ +/record + +record model=ir.model.access id=access_configuration_admin +field name=model search=[('model', '=', 'stock.configuration')]/ +field name=group ref=group_stock_admin/ +field name=perm_read eval=True/ +field name=perm_write eval=True/ +field name=perm_create eval=True/ +field name=perm_delete eval=True/ +/record + /data /tryton Index: inventory.xml === --- a/inventory.xml +++ b/inventory.xml @@ -189,7 +189,7 @@ record model=ir.model.access id=access_inventory field name=model search=[('model', '=', 'stock.inventory')]/ -field name=perm_read eval=True/ +field name=perm_read eval=False/ field name=perm_write eval=False/ field name=perm_create eval=False/ field name=perm_delete eval=False/ @@ -205,7 +205,7 @@ record model=ir.model.access id=access_inventory_line field name=model search=[('model', '=', 'stock.inventory.line')]/ -field name=perm_read eval=True/ +field name=perm_read eval=False/ field name=perm_write eval=False/ field name=perm_create eval=False/ field name=perm_delete eval=False/ Index: move.xml === --- a/move.xml +++ b/move.xml @@ -150,7 +150,7 @@ record model=ir.model.access id=access_move field name=model search=[('model', '=', 'stock.move')]/ -field name=perm_read eval=True/ +field name=perm_read eval=False/ field name=perm_write eval=False/ field name=perm_create eval=False/ field name=perm_delete eval=False/ Index: party.xml === --- a/party.xml +++ b/party.xml @@ -14,6 +14,11 @@ field name=modelparty.party,0/field field name=action ref=act_shipment_out_form2/ /record +record model=ir.action-res.group +id=act_shipment_out_form2-group_stock +field name=action ref=act_shipment_out_form2/ +field name=group ref=group_stock/ +/record record model=ir.action.act_window id=act_shipment_out_form3 field name=nameSupplier Shipments/field @@ -26,6 +31,11 @@ field name=modelparty.party,0/field field name=action ref=act_shipment_out_form3/ /record +record model=ir.action-res.group +id=act_shipment_out_form3-group_stock +field name=action ref=act_shipment_out_form3/ +field name=group ref=group_stock/ +/record /data /tryton Index: period.xml === --- a/period.xml +++ b/period.xml @@ -58,6 +58,14 @@ record model=ir.model.access id=access_period field name=model search=[('model', '=', 'stock.period')]/ +field name=perm_read eval=False/ +field name=perm_write eval=False/ +field name=perm_create eval=False/ +field name=perm_delete eval=False/ +/record +record model=ir.model.access id=access_period_stock +field name=model search=[('model', '=', 'stock.period')]/ +field name=group ref=group_stock/ field name=perm_read eval=True/ field name=perm_write eval=False/ field name=perm_create eval=False/ @@ -107,6 +115,14 @@ record model=ir.model.access id=access_period_cache_cache field name=model search=[('model', '=', 'stock.period.cache')]/ +field name=perm_read eval=False/ +field name=perm_write eval=False/ +field name=perm_create eval=False/ +field name=perm_delete eval=False/ +/record +record model=ir.model.access id=access_period_cache_cache_stock +field name=model search=[('model', '=', 'stock.period.cache')]/ +
[tryton-dev] stock_supply: remove default read access for issue2067 (issue110001)
Reviewers: , Please review this at http://codereview.tryton.org/110001/ Affected files: M purchase_request.xml Index: purchase_request.xml === --- a/purchase_request.xml +++ b/purchase_request.xml @@ -85,6 +85,11 @@ field name=act_window ref=act_purchase_request_form/ /record +record model=ir.ui.menu-res.group id=menu_purchase_group_purchase_request +field name=menu ref=purchase.menu_purchase/ +field name=group ref=group_purchase_request/ +/record + menuitem parent=purchase.menu_purchase sequence=20 action=act_purchase_request_form id=menu_purchase_request_form/ @@ -218,6 +223,14 @@ record model=ir.model.access id=access_purchase_request field name=model search=[('model', '=', 'purchase.request')]/ +field name=perm_read eval=False/ +field name=perm_write eval=False/ +field name=perm_create eval=False/ +field name=perm_delete eval=False/ +/record +record model=ir.model.access id=access_purchase_request_sale +field name=model search=[('model', '=', 'purchase.request')]/ +field name=group ref=purchase.group_purchase/ field name=perm_read eval=True/ field name=perm_write eval=False/ field name=perm_create eval=False/ -- tryton-dev@googlegroups.com mailing list
[tryton-dev] sale: remove default read access for issue2067 (issue109001)
Reviewers: , Please review this at http://codereview.tryton.org/109001/ Affected files: M party.xml M sale.xml Index: party.xml === --- a/party.xml +++ b/party.xml @@ -14,6 +14,11 @@ field name=modelparty.party,0/field field name=action ref=act_sale_form2/ /record +record model=ir.action-res.group +id=act_sale_form2-group_sale +field name=action ref=act_sale_form2/ +field name=group ref=group_sale/ +/record /data /tryton Index: sale.xml === --- a/sale.xml +++ b/sale.xml @@ -3,7 +3,6 @@ this repository contains the full copyright notices and license terms. -- tryton data -menuitem name=Sales id=menu_sale sequence=5/ record model=res.group id=group_sale field name=nameSales/field /record @@ -28,6 +27,12 @@ field name=group ref=group_sale_admin/ /record +menuitem name=Sales id=menu_sale sequence=5/ +record model=ir.ui.menu-res.group id=menu_sale_group_sale +field name=menu ref=menu_sale/ +field name=group ref=group_sale/ +/record + record model=ir.action.wizard id=wizard_shipment_handle_exception field name=nameHandle Shipment Exception/field field name=wiz_namesale.handle.shipment.exception/field @@ -272,6 +277,10 @@ /record menuitem parent=menu_sale action=act_sale_form id=menu_sale_form sequence=10/ +record model=ir.ui.menu-res.group id=menu_sale_form_group_sale +field name=menu ref=menu_sale_form/ +field name=group ref=group_sale/ +/record record model=ir.action.act_window id=act_sale_form_draft field name=nameDraft Sales/field @@ -329,7 +338,7 @@ record model=ir.model.access id=access_sale field name=model search=[('model', '=', 'sale.sale')]/ -field name=perm_read eval=True/ +field name=perm_read eval=False/ field name=perm_write eval=False/ field name=perm_create eval=False/ field name=perm_delete eval=False/ @@ -845,7 +854,7 @@ record model=ir.model.access id=access_sale_line field name=model search=[('model', '=', 'sale.line')]/ -field name=perm_read eval=True/ +field name=perm_read eval=False/ field name=perm_write eval=False/ field name=perm_create eval=False/ field name=perm_delete eval=False/ @@ -921,5 +930,41 @@ field name=rule_group ref=rule_group_sale/ /record +record model=ir.model.access id=access_invoice_sale +field name=model search=[('model', '=', 'account.invoice')]/ +field name=group ref=group_sale/ +field name=perm_read eval=True/ +field name=perm_write eval=False/ +field name=perm_create eval=False/ +field name=perm_delete eval=False/ +/record + +record model=ir.model.access id=access_invoice_line_sale +field name=model search=[('model', '=', 'account.invoice.line')]/ +field name=group ref=group_sale/ +field name=perm_read eval=True/ +field name=perm_write eval=False/ +field name=perm_create eval=False/ +field name=perm_delete eval=False/ +/record + +record model=ir.model.access id=access_move_group_sale +field name=model search=[('model', '=', 'stock.move')]/ +field name=group ref=group_sale/ +field name=perm_read eval=True/ +field name=perm_write eval=False/ +field name=perm_create eval=False/ +field name=perm_delete eval=False/ +/record + +record model=ir.model.access id=access_shipment_out_group_sale +field name=model search=[('model', '=', 'stock.shipment.out')]/ +field name=group ref=group_sale/ +field name=perm_read eval=True/ +field name=perm_write eval=False/ +field name=perm_create eval=False/ +field name=perm_delete eval=False/ +/record + /data /tryton -- tryton-dev@googlegroups.com mailing list
[tryton-dev] trytond: remove tabpos from notebook for issue2135 (issue111001)
Reviewers: , Please review this at http://codereview.tryton.org/111001/ Affected files: M CHANGELOG M trytond/ir/ui/board.rnc M trytond/ir/ui/board.rng M trytond/ir/ui/form.rnc M trytond/ir/ui/form.rng Index: CHANGELOG === --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,4 @@ +* Remove tabpos attribute on notebook * Make PYSON more Pythonic * Add readonly on Transaction * Add has_returning on Cursor Index: trytond/ir/ui/board.rnc === --- a/trytond/ir/ui/board.rnc +++ b/trytond/ir/ui/board.rnc @@ -54,8 +54,6 @@ newline = element newline { attlist.newline, empty } attlist.newline = attribute id { text } notebook = element notebook { attlist.notebook, page* } -attlist.notebook = - attribute tabpos { up | down | left | right }? attlist.notebook = [ a:defaultValue = 4 ] attribute colspan { text }? page = element page { Index: trytond/ir/ui/board.rng === --- a/trytond/ir/ui/board.rng +++ b/trytond/ir/ui/board.rng @@ -230,18 +230,6 @@ /define define name=attlist.notebook combine=interleave optional - attribute name=tabpos -choice - valueup/value - valuedown/value - valueleft/value - valueright/value -/choice - /attribute -/optional - /define - define name=attlist.notebook combine=interleave -optional attribute name=colspan a:defaultValue=4/ /optional /define Index: trytond/ir/ui/form.rnc === --- a/trytond/ir/ui/form.rnc +++ b/trytond/ir/ui/form.rnc @@ -164,8 +164,6 @@ attlist.button = attribute name { text } attlist.button = attribute states { text }? notebook = element notebook { attlist.notebook, page* } -attlist.notebook = - attribute tabpos { up | down | left | right }? attlist.notebook = [ a:defaultValue = 4 ] attribute colspan { text }? page = element page { Index: trytond/ir/ui/form.rng === --- a/trytond/ir/ui/form.rng +++ b/trytond/ir/ui/form.rng @@ -637,18 +637,6 @@ /define define name=attlist.notebook combine=interleave optional - attribute name=tabpos -choice - valueup/value - valuedown/value - valueleft/value - valueright/value -/choice - /attribute -/optional - /define - define name=attlist.notebook combine=interleave -optional attribute name=colspan a:defaultValue=4/ /optional /define -- tryton-dev@googlegroups.com mailing list
[tryton-dev] tryton: remove tabpos from notebook for issue2135 (issue110003)
Reviewers: , Please review this at http://codereview.tryton.org/110003/ Affected files: M tryton/gui/window/view_board/parser.py M tryton/gui/window/view_form/view/form_gtk/parser.py Index: tryton/gui/window/view_board/parser.py === --- a/tryton/gui/window/view_board/parser.py +++ b/tryton/gui/window/view_board/parser.py @@ -105,21 +105,14 @@ container.newline() elif node.localName == 'notebook': notebook = gtk.Notebook() -if attrs and 'tabpos' in attrs: -pos = {'up':gtk.POS_TOP, -'down':gtk.POS_BOTTOM, -'left':gtk.POS_LEFT, -'right':gtk.POS_RIGHT -}[attrs['tabpos']] -else: -if CONFIG['client.form_tab'] == 'top': -pos = gtk.POS_TOP -elif CONFIG['client.form_tab'] == 'left': -pos = gtk.POS_LEFT -elif CONFIG['client.form_tab'] == 'right': -pos = gtk.POS_RIGHT -elif CONFIG['client.form_tab'] == 'bottom': -pos = gtk.POS_BOTTOM +if CONFIG['client.form_tab'] == 'top': +pos = gtk.POS_TOP +elif CONFIG['client.form_tab'] == 'left': +pos = gtk.POS_LEFT +elif CONFIG['client.form_tab'] == 'right': +pos = gtk.POS_RIGHT +elif CONFIG['client.form_tab'] == 'bottom': +pos = gtk.POS_BOTTOM notebook.set_tab_pos(pos) notebook.set_border_width(3) container.wid_add(notebook, Index: tryton/gui/window/view_form/view/form_gtk/parser.py === --- a/tryton/gui/window/view_form/view/form_gtk/parser.py +++ b/tryton/gui/window/view_form/view/form_gtk/parser.py @@ -432,21 +432,14 @@ notebook = gtk.Notebook() notebook.set_scrollable(True) notebook_list.append(notebook) -if attrs and 'tabpos' in attrs: -pos = {'up':gtk.POS_TOP, -'down':gtk.POS_BOTTOM, -'left':gtk.POS_LEFT, -'right':gtk.POS_RIGHT -}[attrs['tabpos']] -else: -if CONFIG['client.form_tab'] == 'top': -pos = gtk.POS_TOP -elif CONFIG['client.form_tab'] == 'left': -pos = gtk.POS_LEFT -elif CONFIG['client.form_tab'] == 'right': -pos = gtk.POS_RIGHT -elif CONFIG['client.form_tab'] == 'bottom': -pos = gtk.POS_BOTTOM +if CONFIG['client.form_tab'] == 'top': +pos = gtk.POS_TOP +elif CONFIG['client.form_tab'] == 'left': +pos = gtk.POS_LEFT +elif CONFIG['client.form_tab'] == 'right': +pos = gtk.POS_RIGHT +elif CONFIG['client.form_tab'] == 'bottom': +pos = gtk.POS_BOTTOM notebook.set_tab_pos(pos) notebook.set_border_width(3) container.wid_add(notebook, -- tryton-dev@googlegroups.com mailing list
[tryton-dev] tryton: store also non ssl server in fingerprint (issue110004)
Reviewers: , Please review this at http://codereview.tryton.org/110004/ Affected files: M tryton/fingerprints.py M tryton/jsonrpc.py Index: tryton/fingerprints.py === --- a/tryton/fingerprints.py +++ b/tryton/fingerprints.py @@ -21,7 +21,7 @@ try: host, sha1 = line.split(' ') except ValueError: -continue +host, sha1 = line, '' self[host] = sha1 def save(self): @@ -32,6 +32,9 @@ def __setitem__(self, key, value): assert isinstance(key, basestring) -assert len(value) == 59 # len of formated sha1 +if value: +assert len(value) == 59 # len of formated sha1 +else: +value = '' super(Fingerprints, self).__setitem__(key, value) self.save() Index: tryton/jsonrpc.py === --- a/tryton/jsonrpc.py +++ b/tryton/jsonrpc.py @@ -132,7 +132,6 @@ def make_connection(self, host): if self.__connection and host == self.__connection[0]: return self.__connection[1] -fingerprint = None host, extra_headers, x509 = self.get_host_info(host) ca_certs = self.__ca_certs @@ -149,27 +148,41 @@ self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file, ca_certs=ca_certs, cert_reqs=cert_reqs) -self.__connection = host, HTTPSConnection(host) -try: -self.__connection[1].connect() -sock = self.__connection[1].sock +def http_connection(): +self.__connection = host, httplib.HTTPConnection(host) + +def https_connection(): +self.__connection = host, HTTPSConnection(host) try: -peercert = sock.getpeercert(True) -except socket.error: -peercert = None -def format_hash(value): -return reduce(lambda x, y: x + y[1].upper() + -((y[0] % 2 and y[0] + 1 len(value)) and ':' or ''), -enumerate(value), '') -fingerprint = format_hash(hashlib.sha1(peercert).hexdigest()) -except ssl.SSLError, e: -self.__connection = host, httplib.HTTPConnection(host) +self.__connection[1].connect() +sock = self.__connection[1].sock +try: +peercert = sock.getpeercert(True) +except socket.error: +peercert = None +def format_hash(value): +return reduce(lambda x, y: x + y[1].upper() + +((y[0] % 2 and y[0] + 1 len(value)) and ':' or ''), +enumerate(value), '') +return format_hash(hashlib.sha1(peercert).hexdigest()) +except ssl.SSLError, e: +http_connection() + +fingerprint = '' +if self.__fingerprints is not None and host in self.__fingerprints: +if self.__fingerprints[host]: +fingerprint = https_connection() +else: +http_connection() +else: +fingerprint = https_connection() + if self.__fingerprints is not None: -if host in self.__fingerprints: +if host in self.__fingerprints and self.__fingerprints[host]: if self.__fingerprints[host] != fingerprint: self.close() raise ssl.SSLError('BadFingerprint') -elif fingerprint: +else: self.__fingerprints[host] = fingerprint return self.__connection[1] -- tryton-dev@googlegroups.com mailing list
[tryton-dev] Tryton Client 2.0 Mac Os version
Hi Boys, To exist any Tryton Client 2.0 version Mac Os in development? Oscar Alvarez -- tryton-dev@googlegroups.com mailing list
Re: [tryton-dev] Tryton Client 2.0 Mac Os version
GTK made a change to the location of the pixbuf loaders in the latest stable, and changes to improve keyboard accelerators should be integrated to stable very soon. Also, some changes are necessary to the build environment for 10.7. Once gtk is ready, I will update the build environment instructions on the wiki and build both the Neso and Tryton clients. My apologies for not getting to this sooner, school and work have taken away the great majority of my free time. Hopefully once this work is done, someone can cron up a daily build of the clients. Regards, --phil On Sep 14, 2011, at 6:08 PM, oscar_andres_col oscar.alvarez.mont...@gmail.com wrote: Hi Boys, To exist any Tryton Client 2.0 version Mac Os in development? Oscar Alvarez -- tryton-dev@googlegroups.com mailing list -- tryton-dev@googlegroups.com mailing list
Re: [tryton-dev] Tryton Client 2.0 Mac Os version
Hi, Phillip Thanks for your work in Mac client, I used Linux, but my boss use Mac, so I happy for listen you that soon we will have update the client, Regards, Oscar Alvarez Colombia 2011/9/14 Phillip Heller phel...@me.com GTK made a change to the location of the pixbuf loaders in the latest stable, and changes to improve keyboard accelerators should be integrated to stable very soon. Also, some changes are necessary to the build environment for 10.7. Once gtk is ready, I will update the build environment instructions on the wiki and build both the Neso and Tryton clients. My apologies for not getting to this sooner, school and work have taken away the great majority of my free time. Hopefully once this work is done, someone can cron up a daily build of the clients. Regards, --phil On Sep 14, 2011, at 6:08 PM, oscar_andres_col oscar.alvarez.mont...@gmail.com wrote: Hi Boys, To exist any Tryton Client 2.0 version Mac Os in development? Oscar Alvarez -- tryton-dev@googlegroups.com mailing list -- tryton-dev@googlegroups.com mailing list -- tryton-dev@googlegroups.com mailing list