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
    • Property 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
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. Technical
  3. VH x2many Selectable v 13.0
  4. Sales Conditions FAQ

VH x2many Selectable

by Uv Iah https://apps.odoo.com/apps/modules/browse?author=Uv+Iah
Odoo

$ 39.01

v 13.0 Third Party
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Versions 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 247
Technical Name vh_x2many_selectable
LicenseOPL-1
Websitehttps://apps.odoo.com/apps/modules/browse?author=Uv+Iah
Versions 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0
  • Description
  • Manifest
  • Documentation
  • License

x2many Selectable

Multi-select rows for batch actions — and bulk-add records through a multi-select "Search More" — on any embedded one2many / many2many list.

OPL-1 · Odoo 13

What it does

Two independent widgets for embedded one2many / many2many lists: (1) x2many_selectable on the list — real first-column checkboxes (single click, no boolean field) + buttons declared in the <header> that run on the ticked lines; and (2) many2one_multi_select on a many2one sub-field — its Search More dialog becomes a multi-select list, and each ticked record becomes a new line.

Fully independent. Checkboxes appear only when the list has <header> buttons; bulk add is a separate widget on the many2one sub-field. Use either alone, or both on the same list.

Requirements

Python libraries

None.

System

None (pure client-side widget).

Odoo depends

web

Key features

Real row checkboxes

Same first-column checkboxes and "select all" as a top-level list — one click, no boolean field to add.

Batch action buttons

Declare buttons in the list's <header>; each runs on the ticked lines (self = selection).

groups & attrs

Buttons honour groups= and attrs="{'invisible': [('parent.state','=','…')]}" like form buttons.

Auto-save & reload

The form is saved before the action (new lines get real ids); the list reloads and the selection clears afterwards.

Bulk add via Search More

many2one_multi_select on a m2o sub-field turns its Search More into a multi-select list: the first pick fills the current line, each other pick becomes a new line.

No duplicates (opt-out)

Records already used as lines are hidden from the dropdown & Search More. Set options="{'allow_duplicates': true}" to allow re-picking them.

one2many & many2many

Both widgets work on either field type; pure client-side, depends only on web — no server code, no libs.

How to use

  1. Set widget="x2many_selectable" on the one2many field.
  2. Declare your button(s) inside the list's <header>.
  3. Write the method on the line model — self is the ticked lines.
<field name="line_ids" widget="x2many_selectable">
    <tree editable="bottom">
        <header>
            <button name="action_mark_done" type="object" string="Mark done"
                    groups="base.group_user"
                    attrs="{'invisible': [('parent.state','=','done')]}"/>
        </header>
        <field name="name"/>
    </tree>
</field>
# on the LINE model
def action_mark_done(self):      # self = the ticked lines
    self.write({'done': True})

Bulk add (optional, independent) — put many2one_multi_select on a m2o sub-field; its Search More becomes multi-select and each pick adds a line:

<field name="line_ids" widget="x2many_selectable">
    <tree editable="bottom">
        <field name="product_id" widget="many2one_multi_select"/>
        <field name="qty"/>
    </tree>
</field>

Screenshots

Tick lines → click the button. A checkbox column appears with "select all"; a batch button shows the count.

Selecting lines

The action runs on the selected lines.

After the batch action

Bulk add — "Search More" opens a multi-select list. Tick several records (checkboxes + "select all"); already-used records are hidden.

Search More multi-select dialog

Each picked record becomes a new line.

Lines added from the multi-select

Need help?

Questions, bug reports or feature requests are welcome — email us and we'll get back to you.

Support: vuhaiqn90@gmail.com

Please include your Odoo version and a short view snippet if your question is about a specific list.

License OPL-1 · © Nguyễn Vũ Hải (Uviah)
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 247
Technical Name vh_x2many_selectable
LicenseOPL-1
Websitehttps://apps.odoo.com/apps/modules/browse?author=Uv+Iah

x2many Selectable — row checkboxes + batch action buttons

Overview

A reusable field widget that turns any embedded one2many or many2many list into a multi-select list — the framework's real first-column checkboxes and "select all" (single click, no boolean field) — and renders batch-action buttons declared right in the list's <header>. The user ticks lines and clicks a button; the method runs on exactly those line records.

One widget (x2many_selectable) with two independent capabilities on both one2many and many2many fields.

Two independent widgets:

  • x2many_selectable (on the o2m/m2m field) — row selection + batch actions, active when the list has <header> buttons: real first-column checkboxes + "select all"; each button runs on the ticked lines (self is the selection). Honours groups= and invisible="parent.<field> == ..." like form buttons. The form is auto-saved before the action; the list reloads and the selection clears afterwards.
  • many2one_multi_select (on a many2one sub-field) — bulk add via Search More: the field's "Search More…" dialog opens as a multi-select list; each ticked record becomes a new line (comodel/context read from the field). Records already used as lines are hidden; options="{'allow_duplicates': true}" allows re-picking them.
  • Fully independent — use either alone or both on the same list.
  • Pure client-side; the only dependency is web.

Installation

  1. Copy vh_x2many_selectable into your Odoo addons path.
  2. Update the apps list and install VH x2many Selectable. No Python libraries and no server configuration are required.

Usage

Set the widget on the field and declare your button(s) in the list header:

<field name="line_ids" widget="x2many_selectable">
    <list editable="bottom">
        <header>
            <button name="action_mark_done" type="object" string="Mark done"
                    groups="base.group_user"
                    invisible="parent.state == 'done'"/>
        </header>
        <field name="name"/>
    </list>
</field>

Write the method on the line model — self is the ticked lines:

def action_mark_done(self):      # self = the ticked lines
    self.write({'done': True})

For a many2many field the ticked comodel records are passed the same way. The button must be defined on the line/comodel model, since Odoo validates header buttons against it.

For bulk add, put many2one_multi_select on a many2one sub-field; its "Search More…" dialog becomes multi-select and each picked record adds a line:

<field name="line_ids" widget="x2many_selectable">
    <list editable="bottom">
        <field name="product_id" widget="many2one_multi_select"/>
        <field name="qty"/>
    </list>
</field>

Support

Questions, bug reports and feature requests: vuhaiqn90@gmail.com (please include your Odoo version).

Odoo Proprietary License v1.0

This software and associated files (the "Software") may only be used (executed,
modified, executed after modifications) if you have purchased a valid license
from the authors, typically via Odoo Apps, or if you have received a written
agreement from the authors of the Software (see the COPYRIGHT file).

You may develop Odoo modules that use the Software as a library (typically
by depending on it, importing it and using its resources), but without copying
any source code or material from the Software. You may distribute those
modules under the license of your choice, provided that this license is
compatible with the terms of the Odoo Proprietary License (For example:
LGPL, MIT, or proprietary licenses similar to this one).

It is forbidden to publish, distribute, sublicense, or sell copies of the Software
or modified copies of the Software.

The above copyright notice and this permission notice must be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author or have a question related to your purchase, please use the support page.
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

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