Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Odoo Development Cookbook

You're reading from   Odoo Development Cookbook Build effective applications by applying Odoo development best practices

Arrow left icon
Product type Paperback
Published in Apr 2016
Last Updated in Feb 2025
Publisher Packt
ISBN-13 9781785883644
Length 400 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (3):
Arrow left icon
Holger Brunn Holger Brunn
Author Profile Icon Holger Brunn
Holger Brunn
 Fayolle Fayolle
Author Profile Icon Fayolle
Fayolle
Daniel Reis Daniel Reis
Author Profile Icon Daniel Reis
Daniel Reis
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Installing the Odoo Development Environment 2. Managing Odoo Server Instances FREE CHAPTER 3. Creating Odoo Modules 4. Application Models 5. Basic Server Side Development 6. Advanced Server Side Development Techniques 7. Debugging and Automated Testing 8. Backend Views 9. Module Data 10. Access Security 11. Internationalization 12. Automation and Workflows 13. Web Server Development 14. CMS Website Development 15. Web Client Development 16. Server Deployment Index

Loading data using XML files


Using Chapter 4, Application Models data model, we'll add a book and an author as demonstration data, while we add a well known publisher as normal data in our module.

How to do it...

Create two XML files and link them in your __openerp__.py manifest file:

  1. Add in a file called data/demo.xml to your manifest, in the demo section:

        'demo': [
            'data/demo.xml',
        ],
  2. Add content to this file:

    <odoo>
        <record id="author_af" model="res.partner">
            <field name="name">Alexandre Fayolle</field>
        </record>
        <record id="author_dr" model="res.partner">
            <field name="name">Daniel Reis</field>
        </record>
        <record id="author_hb" model="res.partner">
            <field name="name">Holger Brunn</field>
        </record>
        <record id="book_cookbook" model="library.book">
            <field name="name">Odoo Cookbook</field>
            <field name="short_name"...
lock icon The rest of the chapter is locked
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Odoo Development Cookbook
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime
Modal Close icon
Modal Close icon