Odoo Help

Demirel yakito
On 12/29/14, 12:12 AM


from openerp import models, fields, api, _

class student_details(models.Model):

    number1=fields.Float(string="Enter number 1: ")
    number2=fields.Float(string="Enter number 2: ")
    sum=fields.Float(string="Sum: ",compute="addition_operation")


    def addition_operation(self):


<?xml version="1.0" encoding="UTF-8"?>
        <record model="ir.ui.view" id="form_id">
            <field name="name">Student details</field>
            <field name="model">student.process</field>
            <field name="arch" type="xml">
                <form string="Student" version="7.0" >
                    <group><field name="number1"></field>
                        <field name="number2"></field>
                        <field name="sum"></field></group>        

<record model="ir.actions.act_window" id="gopal_action">
            <field name = "name">STUDENT DETAILS</field>
            <field name = "res_model">student.process</field>
            <field name = "view_mode">tree,form</field>
        <menuitem name="Child" id="child"  parent="parent" action="gopal_action"></menuitem>

On 1/13/15, 3:51 AM

the codes are not working. one thing what is the purpose of api? and also kindly please give me a good example.. kindly provide a simple code? thanks and advance

there is no wrong in this code. iam worked this code before u sent. once u type some number in number1 and number 2 field, tht will sum together and display result in sum field. its very simple example.

Demirel yakito
on 1/20/15, 2:18 AM

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 12/28/14, 9:05 PM
Seen: 1214 times
Last updated: 3/28/15, 3:13 AM