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
      • 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. Accounting
  3. Mass Move to Draft v 17.0
  4. Sales Conditions FAQ

Mass Move to Draft

by Custom
Odoo
v 17.0 Third Party 7
Download for v 17.0 Deploy on Odoo.sh
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies • Invoicing (account)
• Discuss (mail)
Lines of code 36
Technical Name mass_move_to_draft
LicenseLGPL-3
You bought this module and need support? Click here!

Mass Account Move Actions

Batch Post / Unpost journal entries with ready-to-use Server Actions for accountants.

Odoo 17 CE & EE Lightweight License: OPL-1 Apps: Accounting Version: 17.0.1.0.0

Key Highlights

Two Server Actions

Set to Draft & Post Entries appear in the Actions menu on Journal Entries.

Batch-safe Logic

Checks state per record before calling button_draft() or action_post().

Python Helper Method

action_mass_move_to_draft() for easy reuse in code/automations.

Permission-aware

Limit usage to trusted accounting groups (e.g., Account Managers).

Time Saver

Avoid opening entries one by one when auditing or correcting batches.

Clean Integration

Shipped XML in data/, no extra models; depends only on account.

Why it matters (Business impact)

  • Save time: bulk switch states for many entries in one go.
  • Lower risk: consistent behavior with per-record checks.
  • Audit-friendly: enable temporary unposting for corrections then repost cleanly.

How it works

Extends account.move with a helper and adds two Server Actions:

  • action_mass_move_to_draft(self):
    def action_mass_move_to_draft(self):
        for move in self:
            if move.state == 'posted':
                move.button_draft()
    
  • Server Actions (Python code type) iterate over records and call button_draft() or action_post() based on state.
  • XML is loaded via data/server_actions.xml in __manifest__.py so actions show in UI.

Technical Information

  • Model: account.move (inherit)
  • Methods: action_mass_move_to_draft(), uses button_draft/action_post
  • UI: Actions menu → Server Actions: “Set to Draft”, “Post Entries”
  • Dependencies: account
  • Compatibility: Odoo 17 (CE/EE), Odoo.sh
  • License: OPL-1
  • Author: alaa samy — alaasamy.com
  • Version: 17.0.1.0.0

Warnings & Notes

  • Sensitive accounting action: affects official books — restrict access to trusted accountants.
  • Reconciliation: unposting reconciled entries can fail or be unsafe; clear reconciliations first.
  • Journals & lock dates: some journals/policies prevent unposting; review journal settings and lock dates.
  • Related data: impacts analytic lines, taxes, bank statements; assess before running on real data.
  • Odoo version: behavior of button_draft()/action_post() may differ; verify on your version.

Security & Access

  • Create a dedicated group (e.g., account.group_mass_post_unpost) or reuse account.group_account_manager.
  • Limit Server Actions visibility via groups_id in XML.
  • Optional: add a confirmation wizard and/or chatter logs for extra safety.

QA / Testing Steps

  1. Use staging/test DB first.
  2. Create 3–5 sample moves (draft, posted, reconciled, closed journal).
  3. Run Set to Draft on posted entries; note warnings/failures.
  4. Run Post Entries on draft entries; verify journal items/taxes.
  5. Check reconciliation effects after unposting.
  6. Review logs/chatter if enabled.

Practical Usage

From Accounting → Journal Entries: select multiple posted moves → Action → Set to Draft (if allowed). Similarly, select draft moves → Action → Post Entries to post in bulk.

Future Enhancements

  • Confirmation wizard (reason, date/journal filters).
  • Detailed audit log (who/when/which records).
  • Smart exceptions & CSV report for failures.
  • UI filters (company, journal, date range) before execution.

Files & Module Structure

  • models/account_move.py → action_mass_move_to_draft
  • data/server_actions.xml (or views/server_actions.xml) → Server Actions definitions
  • __manifest__.py → include XML under 'data'
    'depends': ['account'],
    'data': ['data/server_actions.xml'],
    

Operational Tips

  • Backup before running on production.
  • Test on a small selection first.
  • Add chatter note or summary report post-run for traceability.

Changelog

  • v17.0.1.0.0 — Initial release: batch post/unpost via Server Actions.

Screenshots

Journal Entries - Actions menu
Server Actions definitions

App Store Listing (English)

Copy the text below (no emojis). If you use it in __manifest__.py, keep UTF-8 and avoid emojis.

وصف التطبيق (عربي)

انسخ النص أدناه. لو هتستخدمه داخل __manifest__.py يفضَّل بدون إيموجيز ومع حفظ الملف UTF-8.

Support

Need help or have questions? Get in touch.

Visit

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, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.
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