Wrong XML generation break the code on res_user.py when duplicating/creating new group

Bug #976685 reported by Selami Demir
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Fix Released
Undecided
Unassigned

Bug Description

Hi,

When I try to duplicate Accounting & Finance / Invoicing and Payments group I see following error. But when I duplicate other groups no error I see.

Openerp version 6.1 and OS is Ubuntu 11.10 32 bits.

thanks

OpenERP Server Error
Client Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/http.py", line 180, in dispatch
    response["result"] = method(controller, self, **self.params)
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 996, in call
    return self.call_common(req, model, method, args, domain_id, context_id)
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 948, in call_common
    return self._call_kw(req, model, method, args, {})
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 962, in _call_kw
    return getattr(req.session.model(model), method)(*args, **kwargs)
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/openerplib/main.py", line 250, in proxy
    args, kw)
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/openerplib/main.py", line 117, in proxy
    result = self.connector.send(self.service_name, method, *args)
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/http.py", line 611, in send
    raise fault

Server Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/http.py", line 592, in send
    result = openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/usr/lib/pymodules/python2.7/openerp/netsvc.py", line 360, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 572, in dispatch
    res = fn(db, uid, *params)
  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 167, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 121, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 164, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/lib/pymodules/python2.7/openerp/addons/base/res/res_users.py", line 83, in copy
    return super(groups, self).copy(cr, uid, id, default, context)
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 4732, in copy
    new_id = self.create(cr, uid, data, context)
  File "/usr/lib/pymodules/python2.7/openerp/addons/base/res/res_users.py", line 727, in create
    res = super(groups_view, self).create(cr, uid, values, context)
  File "/usr/lib/pymodules/python2.7/openerp/addons/base/res/res_users.py", line 637, in create
    self.write(cr, uid, [gid], {'users': users}, context)
  File "/usr/lib/pymodules/python2.7/openerp/addons/base/res/res_users.py", line 733, in write
    self.update_user_groups_view(cr, uid, context)
  File "/usr/lib/pymodules/python2.7/openerp/addons/base/res/res_users.py", line 768, in update_user_groups_view
    view.write({'arch': xml % ('\n'.join(xml1), '\n'.join(xml2))})
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 368, in function_proxy
    return attr(self._cr, self._uid, [self._id], *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_ui_view.py", line 117, in write
    result = super(view, self).write(cr, uid, ids, vals, context)
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 3943, in write
    self._validate(cr, user, ids, context)
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 1448, in _validate
    if not fun(self, cr, uid, ids):
  File "/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_ui_view.py", line 78, in _check_xml
    eview = etree.fromstring(view.arch.encode('utf8'))
  File "lxml.etree.pyx", line 2743, in lxml.etree.fromstring (src/lxml/lxml.etree.c:52665)
  File "parser.pxi", line 1573, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:79932)
  File "parser.pxi", line 1452, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:78774)
  File "parser.pxi", line 960, in lxml.etree._BaseParser._parseDoc (src/lxml/lxml.etree.c:75389)
  File "parser.pxi", line 564, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:71739)
  File "parser.pxi", line 645, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:72614)
  File "parser.pxi", line 585, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:71955)
XMLSyntaxError: xmlParseEntityRef: no name, line 18, column 31

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Selami,

I have tested your scenario with same OS(11.10 as well as 10.04) and same version latest 6.1. But fortunately all are working fine at my end.

I have attached a video for your more reference, So would you please check it again and notify us have you still faced the problem or not. Or may I missed something.

Thanks and waiting for your reply!

Revision history for this message
Amit Parik (amit-parik) wrote :
Changed in openerp-web:
status: New → Incomplete
Revision history for this message
Selami Demir (sdemir) wrote :

Hi Amit,

Thank your reply. I have atteached a video to see you.

Revision history for this message
Ravish(OpenERP) (rmu-openerp) wrote :

Hello Selami,

I have checked further, It was problem in some revision before .But with following Rev No, it's working fine .

Server No: 4138
Client No: 2059
Addons No: 6733

Please update your code and database with -u all & -d database_name

Thanks!!

Changed in openerp-web:
status: Incomplete → Fix Released
Revision history for this message
Selami Demir (sdemir) wrote :

Hi Ravish,

I updated my server but nothing change. but i saw some error :

2012-04-09 14:27:25,305 3340 WARNING ecrin openerp.modules.loading: Model payment.mode is declared but cannot be loaded! (Perhaps a module was partially removed or renamed)
2012-04-09 14:27:25,305 3340 WARNING ecrin openerp.modules.loading: Model payment.order is declared but cannot be loaded! (Perhaps a module was partially removed or renamed)
2012-04-09 14:27:25,305 3340 WARNING ecrin openerp.modules.loading: Model payment.line is declared but cannot be loaded! (Perhaps a module was partially removed or renamed)
2012-04-09 14:27:25,305 3340 WARNING ecrin openerp.modules.loading: Model payment.order.create is declared but cannot be loaded! (Perhaps a module was partially removed or renamed)
2012-04-09 14:27:25,305 3340 WARNING ecrin openerp.modules.loading: Model account.payment.populate.statement is declared but cannot be loaded! (Perhaps a module was partially removed or renamed)
2012-04-09 14:27:25,305 3340 WARNING ecrin openerp.modules.loading: Model account.payment.make.payment is declared but cannot be loaded! (Perhaps a module was partially removed or renamed)

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Selami,

Please provide your addons and server rev no.

Thanks in advance!

Revision history for this message
Selami Demir (sdemir) wrote :

Hi,

I reinstall account_payment modele and its ok now. Instaled version of account_payment module is 6.1.1.1. Openerp server version is 6.1-1.

Note: I cant list models ( Menu : Setting / Customisation / Database Structure / Models ). I see some error page. But When I filter some models which are account.payment.make and account.payment. populate I can list modules. After reisntall account_payment module its ok.

Thanks.

Revision history for this message
Selami Demir (sdemir) wrote :

Hi,

Sorry. But nothing change after update. I added a video for you. but model list is ok.

Amit Parik (amit-parik)
summary: - Error copying Accounting & Finance / Invoicing and Payments groups
+ Wrong XML generation break the code on res_user.py when
+ duplicating/creating new group
Revision history for this message
Ravish(OpenERP) (rmu-openerp) wrote :

Hello Selami,

As I said on my comment #4 this issue are already fixed on 6.1 as well as trunk

Please see following detalis

http://bazaar.launchpad.net/~openerp/openobject-server/6.1/revision/4066.1.1
(Fixed on 6.1) merged with 4155 rev no.

Revision ID: <email address hidden>

Hope this will help for you!

Thanks!

affects: openerp-web → openobject-server
Revision history for this message
Selami Demir (sdemir) wrote :

Hi,

Yes I try this revision and now no problem.

Thank You.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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