hello Diego,

I tested with the environment you set up in the current trunk code. and
gtk client  sends  the  context set on the field in xml to the server.
here is what I tested.

set account.invoice.line list view to editable="bottom" and set context
in the field ''invoice_line" of account.invoice.form view as
context="{'test_my_context':'yes'}" and also wrote an on_change call ,
the xml code looks like this:

<field colspan="4" name="invoice_line" nolabel="1"
widget="one2many_list" on_change="onchange_test_ctx()"
context="{'test_my_context':'yes'}"/>

Here what I receive as rpc_call to server when I click new:

DEBUG_RPC:rpc.request:('execute', 'trunk', 1, '*', ('account.invoice.line', 
'default_get', ['uos_id', 'account_id', 'price_unit', 'price_subtotal', 
'discount', 'quantity', 'name'], {'lang': 'en_US', 'tz': False, 'section_id': 
False, 'test_my_context': 'yes', 'project_id': False}))
DEBUG_RPC:rpc.request:('execute', 'trunk', 1, '*', ('account.invoice', 
'onchange_test_ctx', [42]))

Here what I receive as rpc_call to server when I press bottom arrow:

DEBUG_RPC:rpc.request:('execute', 'trunk', 1, '*', ('account.invoice.line', 
'default_get', ['uos_id', 'account_id', 'price_unit', 'price_subtotal', 
'discount', 'quantity', 'name'], {'lang': 'en_US', 'tz': False, 'section_id': 
False, 'test_my_context': 'yes', 'project_id': False}))
DEBUG_RPC:rpc.request:('execute', 'trunk', 1, '*', ('account.invoice', 
'onchange_test_ctx', [42]))

Here as you can see from the rpc call the context is passed to the
server.

Please correct me If I am missing something. I would like to close this
bug. please reopen if you find a valid reason.

Thanks,


** Changed in: openobject-client
       Status: Confirmed => Invalid

** Changed in: openobject-client
    Milestone: None => 6.0-rc2

-- 
You received this bug notification because you are a member of OpenERP
sa GTK client R&D, which is a bug assignee.
https://bugs.launchpad.net/bugs/661509

Title:
  v6 rc1 context not evaled on new button on editable tree

Status in OpenObject GTK Client:
  Invalid

Bug description:
  When I use a new button on a editable tree, context is not evaluated.
To fix this I change model_new on class ModelRecordGroup on 
bin/widget/model/group.py
 whit this code:

    def model_new(self, default=True, domain=[], context={}):
        ctx2 = self.context.copy()
        ctx2.update(context)
        self.context = ctx2
        ....
        ....





_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to