← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 623967] Re: not context in web-client

 

Doesn't look like a bug at my end.
However, if you still face such a problem, let us know more with more information and proper steps.
Thanks.

** Changed in: openobject-client-web
       Status: Incomplete => Invalid

-- 
not context in web-client
https://bugs.launchpad.net/bugs/623967
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.

Status in OpenObject Web Client: Invalid

Bug description:
    def onchange_produto(self, cr, uid, ids, produto_id, empresa_id, context=None):
        ...
        return {
                'value': {
                          'produto_id': produto_id,
                          'valor_unitario_bruto': preco_venda,
                          'grade_id': False
                          },
                'warning': warning,
                'context': {'produto_id': produto_id}
                }


method in other class:
    def search_produto_in_locacao(self, cr, uid, local_id, context=None):
        print 'context ->', context
        ....
        return True

print result:
    Desktop Client
    >>> context -> {'lang': u'pt_BR', 'local_id': 1, 'tz': False, 'produto_id': 1}

    Web Client
    >>> context -> {'lang': u'pt_BR', 'tz': False, 'client': 'web', 'local_id': 1, 'active_ids': [1], 'active_id': 1}

loca_id is a past context in xml:
<field name="produto_id" on_change="onchange_produto(produto_id, parent.empresa_id)" context="{'local_id':local_id}"/>