python - OpenERP / Odoo Unexpected View Parsing error -
python - OpenERP / Odoo Unexpected View Parsing error -
hy all,
i'm doing update openerp 6.1 odoo8. have self written modul, adapted python code , everthings seems fine, can install modul, if load view next error:
file "./openerp/models.py", line 1295, in _validate_fields raise validationerror('\n'.join(errors)) parseerror: "validateerror field(s) `arch` failed against constraint: invalid view definition error details: element '<xpath expr="//footer">' cannot located in parent view error context: view `mail.compose.message.form` [view_id: 248, xml_id: email_template.email_compose_message_wizard_inherit_form, model: mail.compose.message, parent_id: 216]" while parsing /home/gsatter/dokumente /odoo/odoo/seekda_addons/seekda_mail_extension/wizard/mail_compose_view.xml:4, near <record model="ir.ui.view" id="mail.email_compose_message_wizard_form"> <field name="name">mail.compose.message.form</field> <field name="model">mail.compose.message</field> <field name="type">form</field> <field name="arch" type="xml"> <form string="compose email"> <group col="6" colspan="4"> <field name="model" invisible="1"/> <field name="res_id" invisible="1"/> <field name="email_from" colspan="4" required="1"/> <field name="email_to" colspan="4" required="1"/> <field name="email_cc" colspan="4"/> <field name="email_bcc" colspan="4"/> <field name="reply_to" colspan="4"/> <field name="subject" colspan="4" widget="char" size="512"/> <field name="references" invisible="1"/> <field name="message_id" invisible="1"/> </group> <notebook colspan="4"> <page string="body"> <field name="body_text" colspan="4" nolabel="1" height="300" width="300"/> </page> <page string="attachments"> <field name="attachment_file_ids" colspan="4" nolabel="1" string="files"> <form> <field name="data" filename="name" colspan="4"/> <field name="name" colspan="4"/> </form> <tree> <field name="data" filename="name" colspan="4"/> <field name="name" colspan="4"/> </tree> </field> </page> </notebook> <group col="4" colspan="4"> <label string="" name="placeholder" colspan="1"/> <button icon="gtk-close" special="cancel" string="cancel"/> <button icon="gtk-ok" name="send_mail" string="send" type="object"/> </group> </form> </field> </record>
has thought wrong wizard? here view (wizard):
<?xml version="1.0" encoding="utf-8"?> <openerp> <data> <record model="ir.ui.view" id="mail.email_compose_message_wizard_form"> <field name="name">mail.compose.message.form</field> <field name="model">mail.compose.message</field> <field name="type">form</field> <field name="arch" type="xml"> <form string="compose email"> <group col="6" colspan="4"> <field name="model" invisible="1"/> <field name="res_id" invisible="1"/> <field name="email_from" colspan="4" required="1"/> <field name="email_to" colspan="4" required="1"/> <field name="email_cc" colspan="4"/> <field name="email_bcc" colspan="4"/> <field name="reply_to" colspan="4"/> <field name="subject" colspan="4" widget="char" size="512"/> <field name="references" invisible="1"/> <field name="message_id" invisible="1"/> </group> <notebook colspan="4"> <page string="body"> <field name="body_text" colspan="4" nolabel="1" height="300" width="300"/> </page> <page string="attachments"> <field name="attachment_file_ids" colspan="4" nolabel="1" string="files"> <form> <field name="data" filename="name" colspan="4"/> <field name="name" colspan="4"/> </form> <tree> <field name="data" filename="name" colspan="4"/> <field name="name" colspan="4"/> </tree> </field> </page> </notebook> <group col="4" colspan="4"> <label string="" name="placeholder" colspan="1"/> <button icon="gtk-close" special="cancel" string="cancel"/> <button icon="gtk-ok" name="send_mail" string="send" type="object"/> </group> </form> </field> </record> </data>
her view inherits view top (it's located in addon email_template):
<?xml version="1.0" encoding="utf-8"?> <openerp> <data> <record model="ir.ui.view" id="email_compose_message_wizard_inherit_form"> <field name="name">mail.compose.message.form</field> <field name="model">mail.compose.message</field> <field name="inherit_id" ref="mail.email_compose_message_wizard_form"/> <field name="groups_id" eval="[(4,ref('base.group_user'))]"/> <field name="arch" type="xml"> <xpath expr="//footer" position="inside"> <group class="oe_right oe_form" col="1"> <div>use template <!--fix: avoid css issue of many2one field in footer temporary used oe_form (bug:1152464)--> <field name="template_id" nolabel="1" class='oe_inline' options="{'no_create': true}" on_change="onchange_template_id(template_id, composition_mode, model, res_id, context)" domain="[('model_id.model','=',model)]" context="{'default_model': model, 'default_body_html': body, 'default_subject': subject}"/> </div> <button icon="/email_template/static/src/img/email_template_save.png" type="object" name="save_as_template" string="save new template" class="oe_link" help="save new template"/> </group> </xpath> </field> </record> </data>
thank you
the problem
... ... <field name="inherit_id" ref="mail.email_compose_message_wizard_form"/> ... ... <xpath expr="//footer" position="inside"> ... ...
your above view inherit mail.email_compose_message_wizard_form
view. , in view mention <xpath expr="//footer" position="inside">
add together below code within parent's view's footer
tab. parent view has no footer
tag , giving error element '<xpath expr="//footer">' cannot located in parent view
you can seek
<xpath expr="//notebook" position="inside">
python view openerp odoo
Comments
Post a Comment