在openerp中获得错误res.partner?

时间:2013-12-10 07:02:52

标签: python xml-parsing openerp

我是openerp的新手。当我更新一个模块时,我从res.partner收到错误,

AttributeError:'NoneType'对象没有属性'is_transient'

2013-12-10 06:19:41,192 28014 ERROR  openerp.tools.convert: Parse error in /opt/openerp/addons/portal/security/portal_security.xml:5: 
<record id="portal_read_own_res_partner" model="ir.rule">
    <field name="name">res_partner: read access on my partner</field>
    <field name="model_id" ref="base.model_res_partner"/>
    <field name="domain_force">[('user_ids', 'in', user.id)]</field>
    <field name="groups" eval="[(4, ref('group_portal')), (4, ref('group_anonymous'))]"/>
    <field name="perm_create" eval="False"/>
    <field name="perm_unlink" eval="False"/>
    <field name="perm_write" eval="False"/>
</record>


Traceback (most recent call last):
  File "/opt/openerp/server/openerp/tools/convert.py", line 847, in parse
    self._tags[rec.tag](self.cr, rec, n)
  File "/opt/openerp/server/openerp/tools/convert.py", line 814, in _tag_record
    id = self.pool.get('ir.model.data')._update(cr, self.uid, rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode, context=rec_context )
  File "/opt/openerp/server/openerp/addons/base/ir/ir_model.py", line 964, in _update
    res_id = model_obj.create(cr, uid, values, context=context)
  File "/opt/openerp/server/openerp/addons/base/ir/ir_rule.py", line 166, in create
    res = super(ir_rule, self).create(cr, uid, vals, context=context)
  File "/opt/openerp/server/openerp/osv/orm.py", line 4472, in create
    self._validate(cr, user, [id_new], context)
  File "/opt/openerp/server/openerp/osv/orm.py", line 1529, in _validate
    if not fun(self, cr, uid, ids):
  File "/opt/openerp/server/openerp/addons/base/ir/ir_rule.py", line 68, in _check_model_obj
    return not any(self.pool.get(rule.model_id.model).is_transient() for rule in self.browse(cr, uid, ids, context))
  File "/opt/openerp/server/openerp/addons/base/ir/ir_rule.py", line 68, in <genexpr>
    return not any(self.pool.get(rule.model_id.model).is_transient() for rule in self.browse(cr, uid, ids, context))
AttributeError: 'NoneType' object has no attribute 'is_transient'

0 个答案:

没有答案