Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
5146 Переглядів

Hi, i want to inherit the view partenariat described in the bellow code, and add to it 3 fields

<record model="ir.ui.view" id="partenariat_form"> 
    <field name="name">partenariat.form</field> 
    <field name="model">partenariat</field> 
    <field name="type">form</field> 
    <field name="arch" type="xml">
     <form string="Formulaire partenariat" version="7.0" > 
        <sheet>
           <group col="2" string="Gestion des Partenariats">

            <field name="sujet"/> 
            <field name="organisateur"/>
            <field name="lieu"/> 
            <field name="date_debut"/>
            <field name="date_fin" /> 
          </group>
          </sheet>
        </form>
    </field>
</record>

i wirite the code of the salon view who inherit from patenariat view like bellow:

<record model="ir.ui.view" id="salon_form"> 
    <field name="name">salon.form</field> 
    <field name="model">salon</field> 
    <field name="type">form</field> 
    <field name="inherit_id" ref="partenariat_form"/>  
    <field name="arch" type="xml">
    <xpath expr="/form/sheet/group/field[@name='date_fin']" position="after">
                    <field name="prix_par_metre_salon" widget="integer"/>
                    <field name="espace_reserve_salon" widget="integer"/> 
                    <field name="cout_total_salon" widget="integer"/>
            </xpath>  

    </field> 
</record>

i was succeed to inherit fields, but i dont have a good result because my salon view is not in a sheet and don't have a title, i want that my salon views in a sheet, i try t add sheet balise but also no changes, plz help me

Аватар
Відмінити
Найкраща відповідь

Hi,

Try this code

<record model="ir.ui.view" id="partenariat_form"> 
<field name="name">partenariat.form</field> 
<field name="model">partenariat</field> 
<field name="type">form</field> 
<field name="arch" type="xml">
 <form string="Formulaire partenariat" version="7.0" > 
        <sheet>
           <group string="Gestion des Partenariats">
                <field name="sujet"/> 
                <field name="organisateur"/>
                <field name="lieu"/> 
                <field name="date_debut"/>
                <field name="date_fin" /> 
            </group>
        </sheet>
    </form>
</field>

</record>

<record model="ir.ui.view" id="salon_form"> 
    <field name="name">salon.form</field> 
    <field name="model">salon</field> 
    <field name="type">form</field> 
    <field name="inherit_id" ref="your_module_name.partenariat_form"/>  
    <field name="arch" type="xml">

            <xpath expr="/form/sheet/group/field[@name='date_fin']" position="after">
                <field name="prix_par_metre_salon" widget="integer"/>
                <field name="espace_reserve_salon" widget="integer"/> 
                <field name="cout_total_salon" widget="integer"/>
            </xpath>  

    </field> 
</record>
Аватар
Відмінити
Автор

thanx for your answer but there is no changes :/

Means your field is not showing ??

Автор

fields are showing but the sheet is no showing

Автор

i want that the salon view who inherit from the partenariat view, be in the sheet like the partenariat view, this is the probleme

Means you want add new sheet and that all fields are will be in new sheet ?

Автор

yes i want that the view salon be in a sheet with her fields and the inherited fields

Автор

yes i want that the view salon be in a sheet with her fields and the inherited fields

can u add screen shot now looking of your field and where you want do change ?

Автор

i really want but i can't because i don't have points karama necessary

Автор

i want that the view salon be like the result of this but with inhetance:

<form string="Formulaire Salon" version="7.0" > <sheet> <group string="group_test"> <group string="Gestion des Salons"> <field name="sujet"/> <field name="organisateur"/> <field name="lieu"/> <field name="date_debut"/> <field name="date_fin" /> <field name="prix_par_metre_salon" widget="integer"/> <field name="espace_reserve_salon" widget="integ

Автор

no changes jack , i don't know why, can you give me your emails and i send to you the modules ???

I have update ans pls check it

Автор Найкраща відповідь

i want that the view salon be like the result of this but with inhetance:

<form string="Formulaire Salon" version="7.0" > 
        <sheet>
           <group string="group_test">
               <group string="Gestion des Salons">
                    <field name="sujet"/> 
                    <field name="organisateur"/>
                    <field name="lieu"/> 
                    <field name="date_debut"/>
                    <field name="date_fin" />
                     <field name="prix_par_metre_salon" widget="integer"/>
                    <field name="espace_reserve_salon" widget="integer"/> 
                    <field name="cout_total_salon" widget="integer"/>
                </group>
            </group>
        </sheet>
    </form>
Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
1
бер. 15
3573
17
груд. 21
24437
1
груд. 18
19582
1
лип. 15
7141
2
бер. 15
5456