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. Delivery
  3. Logistics Bahrain Customs v 19.0
  4. Sales Conditions FAQ

Logistics Bahrain Customs

by ERP Heritage https://www.erpheritage.com.au/
Odoo
v 19.0 Third Party 16
Download for v 19.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)
• Sales (sale_management)
• Purchase (purchase)
• Discuss (mail)
Community Apps Dependencies Show
• Customs Broker
• Logistics Bahrain
• Logistics Suite Base
• Freight Forwarding
• Logistics Quotation
Lines of code 9905
Technical Name eh_log_l10n_bh_customs
LicenseLGPL-3
Websitehttps://www.erpheritage.com.au/
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies • Invoicing (account)
• Sales (sale_management)
• Purchase (purchase)
• Discuss (mail)
Community Apps Dependencies Show
• Customs Broker
• Logistics Bahrain
• Logistics Suite Base
• Freight Forwarding
• Logistics Quotation
Lines of code 9905
Technical Name eh_log_l10n_bh_customs
LicenseLGPL-3
Websitehttps://www.erpheritage.com.au/
ERP Heritage · Logistics Suite
ERP Heritage Logistics Suite

Bahrain Customs OFFS Adapter

The Bahrain customs pack for the logistics suite: an OFFS single window adapter plus country-scoped declaration types and HS overlays, mock-ready on a fresh install.

Free · LGPL-3Odoo 19 Communityv19.0.1.0.0v19.0.1.0.0
OFFS single window adapter
Declaration submit and status
6 Bahrain declaration types
Bahrain HS overlay
Mock-mode fixture replay

Why this module

Bahrain Customs OFFS Adapter

Regulator-ready

OFFS contract, not a stub

A concrete adapter that serialises declarations into the OFFS single window JSON envelope and parses the regulator response, surfacing the issued reference, accept or reject status, and per-field error list. Submit, status, and health message types are wired.

Install and run

Mock mode on first boot

A default OFFS profile is seeded in mock mode at install, so the same code path that talks to the regulator replays captured fixtures deterministically in CI and in a fresh database. No live endpoint required to evaluate the flow.

Country pack

Bahrain types and HS, appended

Six Bahrain declaration types (import, export, transit, re-export, temporary admission, GCC inter-state) and a starter HS overlay with Bahrain duty and VAT rates are added on top of the shared masters. Country packs append, they never replace.

Day in the life

A broker submits a Bahrain import declaration

The operator builds an import declaration on the shared customs model, picks the Bahrain import type, and dispatches. The OFFS adapter serialises the parties, totals, and HS-coded lines into the single window JSON envelope and posts over HTTPS, with timeout, retry, exponential backoff with jitter, and a circuit breaker all handled by the shared engine. The regulator response is parsed: an accepted declaration surfaces its OFFS reference number, a rejected one surfaces the per-field error list (for example a missing HS code on a line). Every request and response writes an append-only audit row with auth headers redacted. In mock mode the same path replays a shipped fixture, so a fresh install demonstrates the round trip with zero network.

Edge cases

The cases most modules quietly ignore.

In the shipped code today, each one a place where a cheaper module silently does the wrong thing.

Reject with field errors

When OFFS rejects a declaration, the adapter parses the structured error array into code, message, and field, so a missing-HS-code rejection points the operator at the exact line rather than a generic failure.

Malformed regulator JSON

A non-JSON or truncated submit response raises a typed validation error with the parse detail, instead of silently returning an empty or half-built result.

Schema version mismatch

The adapter pins the OFFS API version and refuses to instantiate against a profile whose api_version differs, so a regulator schema bump becomes a deliberate adapter upgrade, not a silent wire break.

Credential precedence

The bearer token resolves through environment variable, then encrypted config parameter, then the param key, scoped to the profile company, so one install can dispatch to two companies' OFFS accounts without cross-talk.

Circuit breaker open

After a configurable run of consecutive failures the shared breaker opens for a cooldown window and short-circuits further calls into a dead-letter row, protecting the regulator endpoint and surfacing the outage.

Deferment-required import type

The Bahrain import declaration type carries the requires-deferment flag, so the shared customs core can guard an import that lacks a configured deferment account before it is submitted.

What is inside

Built to do the job, end to end.

  • OFFS adapter (offs.py). A concrete subclass of the shared base adapter. Serialises declaration_submit into the OFFS JSON envelope (type, broker reference, date, currency, importer and exporter parties, totals, and numbered HS-coded lines), serialises declaration_status, and parses submit, status, and health responses. Self-registers under the offs provider code at import time.
  • Six Bahrain declaration types. Country-scoped records for import, export, transit, re-export, temporary admission, and GCC inter-state movement, each bound to Bahrain with a display sequence. The import type sets the requires-deferment flag.
  • Bahrain HS overlay. A starter set of Bahrain-scoped HS subheadings (smartphones, portable computers, small passenger vehicles, cigarettes under excise, medicaments) seeded with per-code duty and VAT rates against the 10 percent Bahrain VAT baseline.
  • Seeded mock profile. A default OFFS adapter profile in mock environment, with sandbox endpoint, API key auth method, and the shared timeout, retry, and circuit-breaker settings, so the module is operable the moment it installs.
  • Shared transport engine (inherited). HTTPS dispatch via the base adapter with timeout, retry, exponential backoff with jitter, a database-backed circuit breaker, dead-letter logging, and append-only audit rows with redacted auth headers. The Bahrain module supplies only the OFFS specifics.
  • Adapter tests and fixtures. A test suite covering registry lookup, profile seeding, JSON serialisation, accepted and rejected response parsing, and a full mock-mode round trip, backed by shipped success, rejection, and health fixtures.

Honest about the edges

What this does not do, so nothing surprises you.

  • This is an add-on, not a standalone app. It requires the logistics base, the customs core, and the Bahrain localisation, and it auto-installs only when all are present.
  • The adapter covers three OFFS message types: declaration submit, status, and health check. It does not ship an amendment or cancellation message.
  • There is no scheduled status-polling job in this module. The status message type exists, but calling it is driven by the surrounding customs workflow, not by a cron shipped here.
  • The adapter passes through the duty and VAT amounts it is handed in the payload. It does not itself compute VAT on import or post journal entries to a deferment account; that accounting belongs to the customs core and accounting modules.
  • The default profile ships in mock mode against a sandbox endpoint. Production use requires configuring real OFFS credentials and switching the profile environment.
  • The HS overlay is a starter set of representative subheadings for demonstration and a seed, not a complete Bahrain tariff schedule.
  • This module ships no views, models, or menus of its own. Declaration and HS records are managed through the shared customs core screens.
Search

Bahrain customs, OFFS single window, Bahrain Customs Affairs, Odoo customs declaration, GCC freight forwarding, customs adapter Odoo 19, HS code overlay Bahrain, declaration type import export transit, NBR VAT on import Bahrain, 3PL logistics Odoo, freight broker customs integration, customs declaration submission, mock mode adapter, circuit breaker integration, re-export temporary admission GCC

ERP Heritage

Production-grade Odoo accounting, built to an engineering bar and documented honestly. Support: info@erpheritage.com.au

v19.0.1.0.0 · LGPL-3 · Odoo 19 Community

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.
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