[7.0] Share and Embed options not working

Bug #1111836 reported by Carlos Guerrero
This bug report is a duplicate of:  Bug #1093038: v7.0: unable to share portal. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
New
Undecided
Unassigned

Bug Description

Whenever I try to "share" or "embed" a document in OpenERP 7.0 it throws this on the server:

2013-01-31 20:52:00,236 28993 ERROR openerp7 openerp.netsvc: has_share() takes at least 4 arguments (4 given)
Traceback (most recent call last):
  File "/Users/guerrerocarlos/Repositorios/openerp-7.0-20130129-000102/openerp/netsvc.py", line 289, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/Users/guerrerocarlos/Repositorios/openerp-7.0-20130129-000102/openerp/service/web_services.py", line 614, in dispatch
    res = fn(db, uid, *params)
  File "/Users/guerrerocarlos/Repositorios/openerp-7.0-20130129-000102/openerp/osv/osv.py", line 169, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/Users/guerrerocarlos/Repositorios/openerp-7.0-20130129-000102/openerp/osv/osv.py", line 123, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/Users/guerrerocarlos/Repositorios/openerp-7.0-20130129-000102/openerp/osv/osv.py", line 179, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/Users/guerrerocarlos/Repositorios/openerp-7.0-20130129-000102/openerp/osv/osv.py", line 166, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/Users/guerrerocarlos/Repositorios/openerp-7.0-20130129-000102/openerp/addons/share/wizard/share_wizard.py", line 697, in go_step_2
    self._check_preconditions(cr, uid, wizard_data, context=context)
  File "/Users/guerrerocarlos/Repositorios/openerp-7.0-20130129-000102/openerp/addons/portal/wizard/share_wizard.py", line 56, in _check_preconditions
    return super(share_wizard_portal, self)._check_preconditions(cr, uid, wizard_data, context=context)
  File "/Users/guerrerocarlos/Repositorios/openerp-7.0-20130129-000102/openerp/addons/share/wizard/share_wizard.py", line 664, in _check_preconditions
    self._assert(self.has_share(cr, uid, context=context),
TypeError: has_share() takes at least 4 arguments (4 given)

I checked the code and seems that the function "has_share" has a weird variable called "unused_param", here is the function:

    def has_share(self, cr, uid, unused_param, context=None):
        return self.has_group(cr, uid, module='share', group_xml_id='group_share_user', context=context)

So when it calls has_group I added a variable to fill that gap, so that the context is recieved properly in has_share, but now the problem is this:

2013-01-31 21:24:49,961 29778 ERROR openerp7 openerp.addons.share.wizard.share_wizard: Failed to create share access
Traceback (most recent call last):
  File "/Users/guerrerocarlos/Repositorios/openerp-7.0-20130129-000102/openerp/addons/share/wizard/share_wizard.py", line 653, in _create_indirect_sharing_rules
    rule_name=rule_name, restrict=True, context=context)
  File "/Users/guerrerocarlos/Repositorios/openerp-7.0-20130129-000102/openerp/addons/share/wizard/share_wizard.py", line 617, in _create_or_combine_sharing_rule
    org_domain = expression.normalize(eval(rule.domain_force, eval_ctx))
AttributeError: 'module' object has no attribute 'normalize'
2013-01-31 21:24:49,962 29778 ERROR openerp7 openerp.netsvc: No se ha podido crear el acceso compartido.

So it seems that "expression", that is imported from openerp.osv does not have a "normalize" function, and dunno where that might be fixed.

Tags: 7.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.