Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

I need to modify inherited sight, without father modifies the sight.

By
pablo
on 4/19/15, 3:06 AM 278 views

Good days:

I need to modify a sight inherited in the V8, without father modifies the list. I am doing a few tests and do not meet on it. If I put <field name = "mode"> primary <//field>, I do not manage to show the field in any of 2 sights (the father, nor the daughter). Though in the list of fields the field appears in both sights (but without showing it) If I add him <;field name = "priority" eval = "8" />, the field appears in 2 sights. The same thing that if I take him <field name = "mode"> primary </field> .-The truth that I do not know where taking it. I leave the code you, for if someone can help me.

models.py

from openerp import models, fields, api

class sonfather(models.Model):

_name= "product.template"

_inherit="product.template"

field_try = fields.Char(string= "Fields of test:", translate=True )


templates.xml

<openerp>

<data>

<menuitem name= "attempt inheritance" id="prueba_main" sequence="90"/>

<menuitem name= "attempt item" id="prueba_main_main" parent="prueba_main"/>

<record id="product_prueba_form_view" model="ir.ui.view" >

<field name="name">product.prueba</field>

<field name="model">product.template</field>

<field name="mode">primary</field>

<field name="priority" eval="8" />

<field name="inherit_id" ref="product.product_template_only_form_view"/>

<field name="arch" type="xml">

<field name="name" position="after">

<group>

<field name="field_try"/>

</group>

</field>

</field>

</record>

<record id="prueba_main_main_action" model="ir.actions.act_window">

<field name="name">Main</field>

<field name="res_model">product.template</field>

<field name="view_mode">tree,form</field>

</record>

<menuitem action="prueba_main_main_action" id="prueba_main_main_menu" sequence="1" parent="prueba_main_main"/>

</data>

</openerp>


Thanks...

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 4/19/15, 3:06 AM
Seen: 278 times
Last updated: 4/19/15, 3:06 AM