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

How to setup approval before posting Einvoice from Odoo16EE after validation of Customer Invoice

Subscribe

Get notified when there's activity on this post

This question has been flagged
accountingeinvoiceEnterpriseOdoo16
2 Replies
2097 Views
Avatar
Tenth Planet

Environment:

- Odoo Version: 16.0 (Enterprise)

- Module: Accounting


Business Requirement:

We need to stop Einvoice posting automatically once Invoice gets validated in Odoo16EE. Einvoice Posting should be done only after Reviewing the invoiced data by management


Use Case:

We have configured EInvoice using IAP in Default Odoo16EE its connected with Live environment. Once invoice is created and validated, system automatically posting einvoice also in GST Portal. This automatic e-invoice posting to gst portal should be stopped even after Invoice validation. Once its gets verified and approved by Finance team, it needs to be posted through Odoo


Questions:

1. Is there any existing functionality in Odoo 16 to control this?

2. If not, what would be the recommended approach to implement this?



Any guidance on implementing this feature would be greatly appreciated. Technical implementation details or pointers to similar solutions would be helpful.

1
Avatar
Discard
Avatar
Tenth Planet
Author Best Answer

Thank you very much for your detailed info. will workout the same.

Regards,

Odoo@Tenthplanet


0
Avatar
Discard
Avatar
Gracious Joseph
Best Answer

To meet your requirement of controlling e-invoice posting in Odoo 16 Enterprise Edition, where e-invoice posting to the GST portal only happens after a review and approval process, here are detailed answers and steps:

1. Existing Functionality in Odoo 16

There is no direct built-in feature in Odoo 16 to control the posting of e-invoices to the GST portal after invoice validation. Odoo’s default behavior posts e-invoices automatically upon validation when configured with IAP.

You will need to customize the workflow to include an intermediate approval process before the e-invoice is posted.

2. Recommended Approach to Implement This Feature

Overview of Implementation

  1. Add a Review Status Field:
    • Introduce a new status (To Review, Approved) to invoices to indicate whether the e-invoice can be posted.
  2. Modify Validation Workflow:
    • Prevent automatic e-invoice posting upon invoice validation.
    • Ensure e-invoice posting occurs only when explicitly triggered by an approved user.
  3. Approval Workflow:
    • Use Odoo’s Approval module or a custom workflow to handle the approval process.
  4. Restrict Posting to Authorized Users:
    • Add access rights or buttons visible only to specific roles (e.g., Finance Team).

3. Step-by-Step Technical Implementation

Step 1: Add a Review Status Field

Add a new field to the invoice (account.move) to track its approval status.

pythonCopy codefrom odoo import models, fields

class AccountMove(models.Model):
    _inherit = 'account.move'

    review_status = fields.Selection([
        ('to_review', 'To Review'),
        ('approved', 'Approved'),
    ], string="Review Status", default='to_review')

Step 2: Modify Automatic Posting Logic

Override the e-invoice posting logic to stop it from triggering upon validation.

pythonCopy codefrom odoo import models

class AccountMove(models.Model):
    _inherit = 'account.move'

    def _post_einvoice(self):
        # Prevent auto-posting if not approved
        for invoice in self:
            if invoice.review_status != 'approved':
                return False  # Skip posting e-invoice
        return super(AccountMove, self)._post_einvoice()  # Continue normal posting for approved invoices

Step 3: Add a Button for Manual Posting

Add a button to manually trigger e-invoice posting once the invoice is approved.

pythonCopy codefrom odoo import models

class AccountMove(models.Model):
    _inherit = 'account.move'

    def action_post_einvoice(self):
        self.ensure_one()
        if self.review_status != 'approved':
            raise ValidationError("Invoice must be approved before posting the e-invoice.")
        self._post_einvoice()

In your XML view:

xmlCopy code<record id="view_invoice_form" model="ir.ui.view">
    <field name="model">account.move</field>
    <field name="inherit_id" ref="account.view_move_form" />
    <field name="arch" type="xml">
        <xpath expr="//header" position="inside">
            <button name="action_post_einvoice" type="object" string="Post E-Invoice"
                    attrs="{'invisible': [('review_status', '!=', 'approved')]}" class="btn-primary" />
        </xpath>
    </field>
</record>

Step 4: Configure an Approval Workflow

Use the Approvals module to configure a review process:

  1. Go to Settings > Approvals and create a new approval request type for e-invoice posting.
  2. Add a related field on invoices to link approval requests.
  3. Update the review_status field when an approval is granted.

Alternatively, create a custom approval workflow:

pythonCopy codedef action_approve(self):
    for record in self:
        record.review_status = 'approved'

Step 5: Adjust Access Rights

Restrict e-invoice posting to specific roles (e.g., Finance Manager).

  • Create a security group in ir.model.access.csv:
csvCopy codeid,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_account_move_finance_manager,access_account_move_finance_manager,model_account_move,group_account_invoice_manager,1,1,1,1
  • Assign this group to the manual posting button.

4. Full Workflow

  1. Invoice Creation and Validation:
    • Invoice is created and validated as usual.
    • E-invoice is not posted automatically.
  2. Review and Approval:
    • Finance or management team reviews the invoice.
    • Approval changes the status to Approved.
  3. Manual E-Invoice Posting:
    • A user with sufficient access posts the e-invoice through a manual action.

5. Benefits

  • Prevents accidental posting of incorrect e-invoices.
  • Introduces a clear review and approval workflow.
  • Allows flexibility in managing roles and responsibilities.

6. Additional Considerations

  • Notifications: Notify responsible users when invoices are ready for review.
  • Audit Trail: Record who approved and posted the e-invoice for compliance.
  • Testing: Thoroughly test the workflow in a staging environment.

0
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
Related Posts Replies Views Activity
E-invoicing Nigeria Country Solved
accounting einvoice
Avatar
Avatar
Avatar
2
Sep 25
1071
Odoo 16EE Accounting GSTR Return Period (GSTR 3B Report issue) Solved
accounting Odoo16 GSTR3B
Avatar
Avatar
2
Apr 25
1981
Error while reversing the journal
accounting ZATCA Odoo16
Avatar
Avatar
1
Sep 25
2136
Group Invoice Analysis by Products instead of Product Variants
accounting InvoiceAnalysis Odoo16
Avatar
0
Jun 24
1605
How To Void Check in Prior Closed Period
accounting Enterprise v14
Avatar
Avatar
1
Nov 21
4561
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