Bulk Edit Records in Single Action [Odoo]

With Mass Editing addons by OCA

Photo by Joey Huang on Unsplash

Usually, when I want update more than one records in Odoo, I have to go through at least three process:

  1. Export its records (with External ID) that I want to change with Export button.
  2. Open, Edit some column with Libre Office Calc (Equal to Microsoft Excel), and Save.
  3. Last, import it back to Odoo.

That process is already easy to use and flexible for User. But only for experience or familiar user. Why? Because when this feature can be accessed by average user and they are not careful enough, its records will has many wrong values. And because of that, the records will be not valid. That’s why I only use it with Administrator login.

Then, what should I do when there are some users that I want to give access to edit many records in single process but low risk method?

Odoo community already has the answer. With Mass Editing addons by OCA (The Odoo Community Assosiation), I can make this happens.

Cite its addons description:

This module provides the following features:

- You can add, update or remove the values of more than one records on the fly at the same time.
- You can configure mass editing for any Odoo model.

Now let’s deep dive into.

Setup

First, I need to install this addons.

Second, I have to create button where should its placed and what fields will be cover to change.

  • Go to Settings / Technical / Actions / Server Actions menu.
  • Create new record, I set the name “Mass Edit Users”. Select Model “Users” and Action To Do “Mass Edit Records”.
  • On Fields tab, add new line and set Field to “Password” because I want to change all users password with the same passphrase on once click.
  • On Security tab, I add group Adminstration / Settings because I just want to show this feature on user admin level.
  • Last, click Create Contextual Action to create action button on Users List View.

Usage

  • Go to Users menu. Select some records and click Action.
  • It shown that there is Mass Edit Users button. Click and will appear a pop up (in Odoo we call it a wizard).
  • Because I want to change password, I choose Set and fill passphrase beside.
  • Apply and done. All selected users has been reset its password.

Further Usage

  • Let’s add more field. I add “Companies” to allow users to access more than companies. I set widget option many2many_tags and this option will be act just like when I add it to XML view.
  • And when I click the action again, there is new field many2many “Companies” that I can Set/Remove/Add items.
  • I can also set a message and show it on the wizard.

Note

Be aware that this addons is still in Beta status. It means this is pre-production quality addons but with potential instability. So use on your own awareness!

Thanks and see you on the next article.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store