任何人都可以帮我修复此错误" ParseError:"记录不存在或已被删除。"

时间:2017-09-01 14:34:45

标签: odoo-8 odoo-9

我继承了res.partner模型,因为我需要res.partner的所有功能,这就是我在自定义模块中继承res.partner模型的原因。我保证我拥有了我认为的所有功能之前。问题是我的模块安装时我无法安装其他模块。如果我在服务器引发错误时尝试安装类似销售点。错误是:"记录不存在或已被删除。"

python代码:

 class Residents(models.Model):
     _inherit = 'res.partner'
     _name = "residents.detail"

     image = fields.Binary(default=lambda self: self._get_default_image())
     name = fields.Char(required=True)

xml代码:

  <record id = "add_field_view_partner_form" model = "ir.ui.view">
       <field name = "name">add.fields</field>
       <field name = "model">residents.detail</field>
              <field name = "arch" type = "xml">
                      <form string = "residents">
                      <sheet>
                           <field name="image" widget='image' class="oe_avatar" options='{"preview_image": "image_medium", "size": [90, 90]}'/>

                           <field name="name" default_focus="1" placeholder="Name" />                               
                      </sheet>
                     </form>
               </field>
    </record >

错误:

ParseError: "Record does not exist or has been deleted.
None" while parsing /home/sibi/odoo/workspace/odoo-9.0c-20170717/openerp/addons/auth_signup/auth_signup_data.xml:6, near

             < record id="default_template_user" model="res.users">
                <field name="name">Template User</field>
                <field name="login">portaltemplate</field>
                <field name="active" eval="False"/>
                <!-- Avoid auto-including this user in any default group, just like a typical portal member -->
                <field name="groups_id" eval="[(6, 0,  [ref('base.group_portal')])]"/>
                <!-- allow signuped users to have a alias -->
                <field name="alias_name">_usertemplate</field>
            </record>

0 个答案:

没有答案