Odoo Help


update data from one model to another

on 4/1/15, 1:11 AM 459 views

Hi,, i need to update details from action to amount ,what changes i have to do.

from openerp.osv import fields,osv

class daily_action(osv.osv):

_name = 'daily.action'

_description = 'dailyaction'


'subject':fields.char('Subject', size=128,required=True),




'type':fields.selection([('transport', 'Transport'),('household','Household'),('personal','Personal')],'Type',required=True),


class daily_amount(osv.osv):

_name = 'daily.amount'

_description = 'dailyamount'

_columns = {

'x_subject': fields.char('Subject', size=128,required=True),

'x_date': fields.date('Date', required=True),

'x_amount': fields.float('Amount', required=True),


<?xml version="1.0" encoding="UTF-8"?>



<menuitem name="Dailyaction" id="base.Daily_Transaction_root" sequence="110"/>

<menuitem name="Dailyaction" id="menu_Daily_Transaction_root" parent="base.Daily_Transaction_root"/>

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

<field name="name">daily action</field>

<field name="model">daily.action</field>

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

<form string="Daily Transaction" version="8.0">


<field name="subject" placeholder="Subject"/>

<field name="date" />

<field name="type" />

<field name="amount" />

<field name="note" />





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

<field name="name">daily amount</field>

<field name="model">daily.amount</field>

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

<tree string="daily amount" >

<field name="x_subject" />

<field name="x_date" />

<field name="x_amount" sum="Total" />




<!--actions -->

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

<field name="name">daily update action</field>

<field name="res_model">daily.action</field>

<field name="view_type">form</field>

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

<field name="search_view_id" eval="False" />

<field name="context">{}</field>

<field name="help">Create New Daily Transaction</field>


<menuitem name="Action" id="menu_Daily_Transaction" parent="menu_Daily_Transaction_root"

sequence="1" action="action_Daily_Transaction"/>

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

<field name="name">daily amount action</field>

<field name="res_model">daily.amount</field>

<field name="view_type">form</field>

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

<field name="search_view_id" />

<field name="context">{}</field>

<field name="help">Create New Daily Transaction</field>


<menuitem name="Amount" id="menu_amount_Transaction" parent="menu_Daily_Transaction_root"

sequence="3" action="action_amount_Transaction"/>




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 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: 4/1/15, 1:11 AM
Seen: 459 times
Last updated: 4/1/15, 1:11 AM