Odoo Server Error
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 642, in apply_inheritance_specs
pre_locate=pre_locate)
File "/usr/lib/python3/dist-packages/odoo/tools/template_inheritance.py", line 230, in apply_inheritance_specs
_("Element '%s' cannot be located in parent view") % tag
ValueError: 元素 '<pivot string="Project Tasks">' 在母级视图中没有找到
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 713, in parse
self._tag_root(de)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 675, in _tag_root
f(rec)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 578, in _tag_record
record = model._load_records([data], self.mode == 'update')
File "/usr/lib/python3/dist-packages/odoo/models.py", line 4043, in _load_records
data['record']._load_records_write(data['values'])
File "/usr/lib/python3/dist-packages/odoo/addons/website/models/ir_ui_view.py", line 140, in _load_records_write
super(View, self)._load_records_write(values)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 3981, in _load_records_write
self.write(values)
File "/usr/lib/python3/dist-packages/odoo/addons/website/models/ir_ui_view.py", line 51, in write
return super(View, self).write(vals)
File "/opt/addons/web_studio/models/studio_mixin.py", line 28, in write
res = super(StudioMixin, self).write(vals)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 490, in write
return super(View, self).write(self._compute_defaults(vals))
File "/usr/lib/python3/dist-packages/odoo/models.py", line 3559, in write
fields[0].determine_inverse(real_recs)
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1096, in determine_inverse
getattr(records, self.inverse)()
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 299, in _inverse_arch
view.write(data)
File "/usr/lib/python3/dist-packages/odoo/addons/website/models/ir_ui_view.py", line 51, in write
return super(View, self).write(vals)
File "/opt/addons/web_studio/models/studio_mixin.py", line 28, in write
res = super(StudioMixin, self).write(vals)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 490, in write
return super(View, self).write(self._compute_defaults(vals))
File "/usr/lib/python3/dist-packages/odoo/models.py", line 3554, in write
real_recs._validate_fields(set(vals) - set(inverse_fields))
File "/usr/lib/python3/dist-packages/odoo/models.py", line 1167, in _validate_fields
check(self)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 385, in _check_xml
view_def = view.read_combined(['arch'])
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 716, in read_combined
arch = self.apply_view_inheritance(arch_tree, root.id, self.model)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 665, in apply_view_inheritance
source = self.apply_inheritance_specs(source, specs_tree, view_id)
File "/opt/addons/web_studio/models/ir_ui_view.py", line 154, in apply_inheritance_specs
pre_locate=pre_locate)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 644, in apply_inheritance_specs
self.raise_view_error(str(e), inherit_id)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 592, in raise_view_error
raise ValueError(message)
ValueError: 元素 '<pivot string="Project Tasks">' 在母级视图中没有找到
错误的上下文:
视图 `project.task.pivot`
[view_id: 1478, xml_id: project.view_project_task_pivot, model: project.task, parent_id: 1115]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 619, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 309, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 14, in reraise
raise value
File "/usr/lib/python3/dist-packages/odoo/http.py", line 664, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 345, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 93, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 338, in checked_call
result = self.endpoint(*a, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 909, in __call__
return self.method(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 510, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1324, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1312, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 395, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 382, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "<decorator-gen-64>", line 2, in button_immediate_upgrade
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 72, in check_and_log
return method(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 629, in button_immediate_upgrade
return self._button_immediate_function(type(self).button_upgrade)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 573, in _button_immediate_function
modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 85, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 416, in load_modules
force, status, report, loaded_modules, update_module, models_to_check)
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 312, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 222, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package, report=report)
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 68, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 737, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 804, in convert_xml_import
obj.parse(doc.getroot())
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 722, in parse
exc_info[2]
File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 13, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 713, in parse
self._tag_root(de)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 675, in _tag_root
f(rec)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 578, in _tag_record
record = model._load_records([data], self.mode == 'update')
File "/usr/lib/python3/dist-packages/odoo/models.py", line 4043, in _load_records
data['record']._load_records_write(data['values'])
File "/usr/lib/python3/dist-packages/odoo/addons/website/models/ir_ui_view.py", line 140, in _load_records_write
super(View, self)._load_records_write(values)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 3981, in _load_records_write
self.write(values)
File "/usr/lib/python3/dist-packages/odoo/addons/website/models/ir_ui_view.py", line 51, in write
return super(View, self).write(vals)
File "/opt/addons/web_studio/models/studio_mixin.py", line 28, in write
res = super(StudioMixin, self).write(vals)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 490, in write
return super(View, self).write(self._compute_defaults(vals))
File "/usr/lib/python3/dist-packages/odoo/models.py", line 3559, in write
fields[0].determine_inverse(real_recs)
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1096, in determine_inverse
getattr(records, self.inverse)()
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 299, in _inverse_arch
view.write(data)
File "/usr/lib/python3/dist-packages/odoo/addons/website/models/ir_ui_view.py", line 51, in write
return super(View, self).write(vals)
File "/opt/addons/web_studio/models/studio_mixin.py", line 28, in write
res = super(StudioMixin, self).write(vals)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 490, in write
return super(View, self).write(self._compute_defaults(vals))
File "/usr/lib/python3/dist-packages/odoo/models.py", line 3554, in write
real_recs._validate_fields(set(vals) - set(inverse_fields))
File "/usr/lib/python3/dist-packages/odoo/models.py", line 1167, in _validate_fields
check(self)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 385, in _check_xml
view_def = view.read_combined(['arch'])
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 716, in read_combined
arch = self.apply_view_inheritance(arch_tree, root.id, self.model)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 665, in apply_view_inheritance
source = self.apply_inheritance_specs(source, specs_tree, view_id)
File "/opt/addons/web_studio/models/ir_ui_view.py", line 154, in apply_inheritance_specs
pre_locate=pre_locate)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 644, in apply_inheritance_specs
self.raise_view_error(str(e), inherit_id)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 592, in raise_view_error
raise ValueError(message)
odoo.tools.convert.ParseError: "元素 '<pivot string="Project Tasks">' 在母级视图中没有找到
错误的上下文:
视图 `project.task.pivot`
[view_id: 1478, xml_id: project.view_project_task_pivot, model: project.task, parent_id: 1115]" while parsing /usr/lib/python3/dist-packages/odoo/addons/project/views/project_views.xml:2, near
<odoo>
<!-- Top menu item -->
<menuitem name="Project" id="menu_main_pm" groups="group_project_manager,group_project_user" web_icon="project,static/description/icon.png" sequence="50"/>
<menuitem id="menu_project_config" name="Configuration" parent="menu_main_pm" sequence="100" groups="project.group_project_manager"/>
<record id="view_task_search_form" model="ir.ui.view">
<field name="name">project.task.search.form</field>
<field name="model">project.task</field>
<field name="arch" type="xml">
<search string="Tasks">
<field name="name" string="Task"/>
<field name="tag_ids"/>
<field name="user_id"/>
<field name="partner_id" operator="child_of"/>
<field name="stage_id"/>
<field name="project_id"/>
<field name="parent_id" groups="project.group_subtask_project"/>
<filter string="My Tasks" name="my_tasks" domain="[('user_id', '=', uid)]"/>
<filter string="Followed Tasks" name="my_followed_tasks" domain="[('message_is_follower', '=', True)]"/>
<filter string="Unassigned" name="unassigned" domain="[('user_id', '=', False)]"/>
<separator/>
<filter string="Starred" name="starred" domain="[('priority', 'in', [1, 2])]"/>
<separator/>
<filter string="Unread Messages" name="message_needaction" domain="[('message_needaction', '=', True)]"/>
<separator/>
<filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
<separator/>
<filter invisible="1" string="Late Activities" name="activities_overdue" domain="[('activity_ids.date_deadline', '<', context_today().strftime('%Y-%m-%d'))]" help="Show all records which has next action date is before today"/>
<filter invisible="1" string="Today Activities" name="activities_today" domain="[('activity_ids.date_deadline', '=', context_today().strftime('%Y-%m-%d'))]"/>
<filter invisible="1" string="Future Activities" name="activities_upcoming_all" domain="[('activity_ids.date_deadline', '>', context_today().strftime('%Y-%m-%d'))]"/>
<separator/>
<filter string="Rated tasks" name="rating_task" domain="[('rating_last_value', '!=', 0.0)]" groups="project.group_project_rating"/>
<group expand="0" string="Group By">
<filter string="Stage" name="stage" context="{'group_by': 'stage_id'}"/>
<filter string="Assigned to" name="user" context="{'group_by': 'user_id'}"/>
<filter string="Project" name="project" context="{'group_by': 'project_id'}"/>
<filter string="Creation Date" name="group_create_date" context="{'group_by': 'create_date'}"/>
<filter string="Company" name="company" context="{'group_by': 'company_id'}" groups="base.group_multi_company"/>
</group>
</search>
</field>
</record>
<record id="act_project_project_2_project_task_all" model="ir.actions.act_window">
<field name="name">Tasks</field>
<field name="res_model">project.task</field>
<field name="view_mode">kanban,tree,form,calendar,pivot,graph,activity</field>
<field name="context">{
'pivot_row_groupby': ['user_id'],
'search_default_project_id': [active_id],
'default_project_id': active_id,
}</field>
<field name="search_view_id" ref="view_task_search_form"/>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Click <i>Create</i> to start a new task.
</p><p>
To get things done, use activities and status on tasks.<br/>
Chat in real time or by email to collaborate efficiently.
</p>
</field>
</record>
<record id="project_task_action_sub_task" model="ir.actions.act_window">
<field name="name">Sub-tasks</field>
<field name="res_model">project.task</field>
<field name="view_mode">kanban,tree,form,calendar,pivot,graph,activity</field>
<field name="search_view_id" ref="project.view_task_search_form"/>
</record>
<!-- Project -->
<record id="edit_project" model="ir.ui.view">
<field name="name">project.project.form</field>
<field name="model">project.project</field>
<field name="arch" type="xml">
<form string="Project">
<header>
<button name="%(portal.portal_share_action)d" string="Share" type="action" class="oe_highlight oe_read_only"/>
</header>
<sheet string="Project">
<div class="oe_button_box" name="button_box" groups="base.group_user">
<button class="oe_stat_button" name="attachment_tree_view" type="object" icon="fa-file-text-o">
<field string="Documents" name="doc_count" widget="statinfo"/>
</button>
<button class="oe_stat_button" type="action" name="%(act_project_project_2_project_task_all)d" icon="fa-tasks">
<field string="Tasks" name="task_count" widget="statinfo" options="{'label_field': 'label_tasks'}"/>
</button>
<button name="action_view_all_rating" type="object" attrs="{'invisible': ['|', '|', ('rating_status', '=', 'no'), ('rating_percentage_satisfaction', '=', -1)]}" class="oe_stat_button oe_percent" icon="fa-smile-o" groups="project.group_project_rating">
<div class="o_field_widget o_stat_info">
<span class="o_stat_value">
<field name="rating_percentage_satisfaction" nolabel="1"/>
</span>
<span class="o_stat_text">
% On <field readonly="1" name="label_tasks" options="{'label_field': 'label_tasks'}"/>
</span>
</div>
</button>
</div>
<widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_title">
<h1>
<field name="name" placeholder="Project Name"/>
</h1>
<div name="options_active">
<div>
<label for="label_tasks" class="oe_inline" string="Name of the tasks :"/>
<field name="label_tasks" class="oe_inline oe_input_align"/>
</div>
</div>
</div>
<notebook>
<page name="settings" string="Settings">
<group>
<group>
<field name="active" invisible="1"/>
<field name="user_id" string="Project Manager" attrs="{'readonly':[('active','=',False)]}"/>
<field name="partner_id" string="Customer"/>
</group>
<group>
<field name="analytic_account_id" domain="['|', ('company_id', '=', company_id), ('company_id', '=', False)]" context="{'default_partner_id': partner_id}" groups="analytic.group_analytic_accounting"/>
<field name="privacy_visibility" widget="radio"/>
<field name="subtask_project_id" groups="project.group_subtask_project"/>
<field name="company_id" groups="base.group_multi_company"/>
</group>
<group name="extra_settings">
</group>
</group>
<div class="row mt16 o_settings_container">
<div id="rating_settings" class="col-lg-6 o_setting_box" groups="project.group_project_rating">
<div class="o_setting_right_pane">
<label for="rating_status"/>
<div class="text-muted">
Get customer feedback
</div>
<div>
<field name="rating_status" widget="radio"/>
<p attrs="{'invisible': [('rating_status','not in',('periodic','stage'))]}" class="text-muted oe_edit_only">
Edit project's stages and set an email template on the stages on which you want to activate the rating.
</p>
<div attrs="{'required': [('rating_status','=','periodic')], 'invisible': [('rating_status','!=','periodic')]}">
<label for="rating_status_period"/>
<field name="rating_status_period" class="oe_inline"/>
</div>
<div attrs="{'invisible': [('rating_status','==','no')]}">
<label for="portal_show_rating"/>
<field name="portal_show_rating"/>
</div>
</div>
</div>
</div>
</div>
<group name="misc">
<group string="Time Scheduling">
<field name="resource_calendar_id"/>
</group>
</group>
</page>
<page name="emails" string="Emails" attrs="{'invisible': [('alias_domain', '=', False)]}">
<group name="group_alias">
<label for="alias_name" string="Email Alias"/>
<div name="alias_def">
<field name="alias_id" class="oe_read_only oe_inline" string="Email Alias" required="0"/>
<div class="oe_edit_only oe_inline" name="edit_alias" style="display: inline;">
<field name="alias_name" class="oe_inline"/>@<field name="alias_domain" class="oe_inline" readonly="1"/>
</div>
</div>
<field name="alias_contact" class="oe_inline oe_edit_only" string="Accept Emails From"/>
</group>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" help="Follow this project to automatically track the events associated to tasks and issues of this project." groups="base.group_user"/>
</div>
</form>
</field>
</record>
<record id="view_project_project_filter" model="ir.ui.view">
<field name="name">project.project.select</field>
<field name="model">project.project</field>
<field name="arch" type="xml">
<search string="Search Project">
<field name="name" string="Project"/>
<field name="user_id" string="Project Manager"/>
<field name="partner_id" string="Customer" filter_domain="[('partner_id', 'child_of', self)]"/>
<filter string="My Favorites" name="my_projects" domain="[('favorite_user_ids', 'in', uid)]"/>
<separator/>
<filter string="Followed" name="followed_by_me" domain="[('message_is_follower', '=', True)]"/>
<separator/>
<filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
<group expand="0" string="Group By">
<filter string="Project Manager" name="Manager" context="{'group_by': 'user_id'}"/>
<filter string="Customer" name="Partner" context="{'group_by': 'partner_id'}"/>
</group>
</search>
</field>
</record>
<record id="view_project" model="ir.ui.view">
<field name="name">project.project.tree</field>
<field name="model">project.project</field>
<field name="arch" type="xml">
<tree decoration-bf="message_needaction==True" decoration-muted="active == False" string="Projects">
<field name="sequence" widget="handle"/>
<field name="message_needaction" invisible="1"/>
<field name="active" invisible="1"/>
<field name="name" string="Project Name"/>
<field name="user_id" string="Project Manager"/>
<field name="partner_id" string="Contact"/>
<field name="company_id" groups="base.group_multi_company"/>
</tree>
</field>
</record>
<record id="project_view_kanban" model="ir.ui.view">
<field name="name">project.project.kanban</field>
<field name="model">project.project</field>
<field name="arch" type="xml">
<kanban class="o_kanban_mobile">
<field name="user_id" string="Project Manager"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_content oe_kanban_global_click o_kanban_get_form">
<div class="row">
<div class="col-12">
<strong><field name="name" string="Project Name"/></strong>
</div>
</div>
<div class="row">
<div class="col-8">
<field name="partner_id" string="Contact"/>
</div>
<div class="col-4">
<div class="oe_kanban_bottom_right">
<img t-att-src="kanban_image('res.users', 'image_128', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" class="oe_kanban_avatar o_image_24_cover float-right"/>
</div>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>