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

How to change existing model record by use of xml data?

By
Antanas
on 7/26/13, 2:03 PM 4,434 views

Hello,

Is it possible to change existing model records by use of xml data file? Let's say there is a record in 'auditrail.rule' where it's field 'log_deletes' is True. Is it possible to change value of this field with xml data file (I mean .xml which is declared in __openerp__.py 'data' key)?

3

Ray Carnes

--Ray Carnes--
15717
| 9 7 9
Greater Los Angeles, United States
--Ray Carnes--

Senior Odoo Analyst

OpenERP 6.1, 7.0 and Odoo 8.0, 9.0 (Since 2012)

Completed Functional and Technical Training.

Major Skills:

  • Needs Discovery and Requirements Analysis;

  • Function and Technical Specifications;

  • Project Planning;

  • Prototyping and Proof of concepts;

  • Data migration;

  • Configuration & Customization (UI and modules);

  • Integration - data, business logic and service levels;

  • Training and Knowledge transfer;

  • Go Live support;

  • Help desk;

  • Version Migration.

I have over 20 years of experience empowering and enabling users with enterprise information systems that make a real and measurable difference in their ability to proactively manage their businesses and organizations. 

Ray Carnes
On 7/27/13, 6:17 PM
<record id="THE XML ID OF THE RECORD YOU WANT TO CHANGE" >
    <model="THE MODEL THAT HOLDS THE RECORD">
    <field name="THE NAME OF THE FIELD TO CHANGE">THE NEW VALUE</field>
</record>

So something like:

<record id="XML ID OF YOUR RECORD - EXPORT THE RECORD TO GET ONE IF IT IS FALSE" 
    <model="audittrail.rule">
    <field name="log_deletes">False</field>
</record>

The record ID of the demo record is audittrail.demo_audittrail_rule

Thank you!

Antanas
on 7/28/13, 4:00 AM

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

0 follower(s)

Stats

Asked: 7/26/13, 2:03 PM
Seen: 4434 times
Last updated: 3/16/15, 8:10 AM