Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

create record automation using odoo studio

Subscribe

Get notified when there's activity on this post

This question has been flagged
3 Replies
7169 Views
Avatar
KENNETH JOHN LAING

how do I use the automation function in odoo studio to create a record?

0
Avatar
Discard
Avatar
Chris TRINGHAM
Best Answer

Here's a simple example that creates reordering rules for a product.  This is for Odoo 16 and earlier, see the other answer for Odoo 17.

You need to know that:

  1. the reordering rules are stored in the Minimum Inventory Rule model (stock.warehouse.orderpoint)
    • primary key is product
  2. we want to create one record for each product on the product.product table (don’t use the product template table product.template)

Start by enabling Developer mode and navigating to Settings / Technical / Automated Actions:

If you cannot find this option, you may need to install the module “Automated Action Rules”.

Click on CREATE and the following screen is displayed:

Action Name: Enter a description (e.g. Set reorder Point)

Model: Product (product.product)

Trigger Condition: On Creation

Apply on: Product Type = ‘product’ (because this does not apply to services or consumable items).

Action To Do: Create a New Record

Create / Write Target Model: Minimum Inventory Rule (stock.warehouse.orderpoint)

Data to Write

Minimum Quantity(stock.warehouse.orderpoint)Value0
Maximum Quantity(stock.warehouse.orderpoint)Value10
Product(stock.warehouse.orderpoint)Python expressionrecord.id

Of course you can enter whatever values you want for minimum and maximum quantity in the first two lines, but the third line (for the product) must be exactly as shown above.

Create reordering rules

Create analytic accounts for sales orders

1
Avatar
Discard
Juris Aidma

Chris - how can you achieve the same in v17?

Chris TRINGHAM

The "Data to Write" tab has been removed, so it all has to be done in Python code (and I'm not a Python programmer). If I have time I'll try to update my answer. I'm not sure this example is needed for Odoo 17, because Replenishment creates these records automatically.

Avatar
Maciej Burzymowski
Best Answer

In Odoo Studio, you can use the automation function to create a record by setting up an Automated Action. Here’s a step-by-step guide on how to do it:

1. Go to Automations:
You can access this from anywhere within Studio.

2. Create an Automated Action
: Define the following elements:

  • Model: Select the model where the automated action should be applied.

  • Trigger: Define when the automated action should be applied. You can choose from six triggers: On Creation, On Update, On Creation & Update, On Deletion, Based on Form Modification, and Based on Timed Condition.

  • Apply on: Define on which records of the model the automated action should be applied.

  • Action: Determine what the automated action should do. In your case, you want to create a record, so you would choose the “Create a new Record” action. Then, you’ll need to specify the model where the new record should be created and set the values for the fields of the new record.

Please note that the exact steps might vary depending on your specific requirements and the version of Odoo you’re using.


0
Avatar
Discard
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Best Answer

Hi,Here are the steps to create record automation using Odoo 17 Studio:

  1. Navigate to the "Automation" section in Odoo 17 Studio.
  2. Click on the "Create" button to create a new automation.
  3. In the "Create Automation" form, enter a name for the automation and select the "Record Rules" option.
  4. In the "Record Rules" tab, select the model for which you want to create the automation.
  5. Define the conditions for the automation by setting up the "Trigger Condition" and "Domain" fields. The "Trigger Condition" field allows you to specify when the automation should be triggered, while the "Domain" field allows you to define the records that the automation should apply to.
  6. In the "Actions" tab, click on the "Add an action" button.
  7. Select the "Create a new record" option from the list of available actions.
  8. In the "Create a new record" form, select the model for the new record and fill in the required fields.
  9. Save the new record automation.

Once you have created the record automation, it will be triggered based on the conditions you defined, and a new record will be created according to the action you specified.

These steps are specified for Version 17, there will be changes in previous versions of Odoo

For further information, you can refer to Odoo's official document
https://www.odoo.com/documentation/17.0/applications/productivity/studio/automated_actions.html


Hope it helps

-1
Avatar
Discard
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now