Skip to content
Health
60/100
fair
  • Security25/25
    No findings
  • Activity25/25
    Last human commit 1 month ago
  • Required by5/25
    0 modules depend on it
  • Maturity5/25
    In 1 Odoo series since 20.0

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
Required by
0
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
LGPL-3
No conflicts with its dependencies
Folder size
0.17 MB
Module directory on disk
Code analysis 0 migration notes 14 models 10 views 0 HTTP endpoints

Description

Pakistan - E-invoicing

To submit invoices through API to the Pakistan government:

  • Step 1: Generate an API token from the Pakistan E-Invoice portal.
  • Step 2: Switch to the company associated with that API token in Odoo.
  • Step 3: Configure the token in Odoo, by going to Invoicing/Accounting → Configuration → Settings, then searching for “Pakistan Electronic Invoicing” and pasting the token.
  • Step 4: Create a customer invoice and use Send & Print to submit it to the Pakistan E-Invoicing system.

Dependencies

Code analysis

Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.

Views touched 10

XML IDNameModelTypeStatus
l10n_pk_edi_sro_view_form l10n_pk_edi.sro.form l10n_pk_edi.sro form New
l10n_pk_edi_sro_view_list l10n_pk_edi.sro.list l10n_pk_edi.sro list New
product_template_form_view product.template.form.inherit.l10n_pk_edi product.template form Inherits product.product_template_form_view
report_invoice report_invoice ir.ui.view qweb Inherits account.report_invoice
report_invoice_document report_invoice_document ir.ui.view qweb Inherits account.report_invoice_document
res_config_settings_view_form res.config.settings.form.inherit.l10n_pk_edi res.config.settings form Inherits account.res_config_settings_view_form
uom_uom_view_form uom.uom.form.inherit.l10n_pk_edi uom.uom form Inherits uom.uom_uom_view_form
uom_uom_view_list uom.uom.list.inherit.l10n_pk_edi uom.uom list Inherits uom.uom_uom_view_list
view_move_form_inherit account.move.form.inherit.l10n_pk_edi account.move form Inherits account.view_move_form
view_partner_property_form res.partner.form.inherit.l10n_pk_edi res.partner form Inherits account.view_partner_property_form

HTTP endpoints 0

No HTTP endpoints found for this module.

Models touched 14

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (4)
  • l10n_pk_edi_enable Boolean
    related='company_id.l10n_pk_edi_enable'
  • l10n_pk_edi_reference Char
    copy=False help='Unique reference number assigned by FBR for the submitted invoice.' readonly=True string='FBR Reference Number' tracking=True
  • l10n_pk_edi_refund_reason Char
    copy=False help='Reason for cancellation or refund of the e-invoice, as reported to FBR.' string='Refund Reason'
  • l10n_pk_edi_status Selection
    copy=False default='to_send' readonly=True selection=[('to_send', 'To Send'), ('sent', 'Valid'), ('failed', 'Invalid'), ('sent_test', 'Valid (Test)')] string='E-Invoice Status' tracking=True
Public methods (1)
  • button_draft(self)

New fields (4)
  • l10n_pk_edi_filter_sro_item_ids One2many
    related='l10n_pk_edi_sro_id.sro_item_ids'
  • l10n_pk_edi_sale_type Selection
    compute='_compute_l10n_pk_edi_from_product' precompute=True readonly=False selection=SALE_TYPE store=True string='Sale Type'
  • l10n_pk_edi_sro_id Many2one → l10n_pk_edi.sro
    comodel_name='l10n_pk_edi.sro' compute='_compute_l10n_pk_edi_from_product' help='FBR Statutory Regulatory Order Schedule' precompute=True readonly=False store=True string='SRO Schedule'
  • l10n_pk_edi_sro_item_id Many2one → l10n_pk_edi.sro.item
    comodel_name='l10n_pk_edi.sro.item' compute='_compute_l10n_pk_edi_from_product' help='FBR Statutory Regulatory Order Item' precompute=True readonly=False store=True string='SRO Item'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (3)
  • l10n_pk_edi_sale_type Selection
    required=True selection=SALE_TYPE string='Sale Type'
  • name Char
    string='Statutory Regulatory Order Schedule'
  • sro_item_ids One2many → l10n_pk_edi.sro.item
    string='Statutory Regulatory Order Items' args: 'l10n_pk_edi.sro.item', 'sro_id'
Public methods (0)

No public methods.

New fields (2)
  • name Char
  • sro_id Many2one → l10n_pk_edi.sro
    string='Statutory Regulatory Order Schedule' args: 'l10n_pk_edi.sro'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (5)
  • l10n_pk_edi_filter_sro_item_ids One2many
    related='l10n_pk_edi_sro_id.sro_item_ids'
  • l10n_pk_edi_sale_type Selection
    default='75' required=True selection=SALE_TYPE string='Sale Type'
  • l10n_pk_edi_sro_id Many2one → l10n_pk_edi.sro
    string='Statutory Regulatory Order Schedule' args: 'l10n_pk_edi.sro'
  • l10n_pk_edi_sro_item_id Many2one → l10n_pk_edi.sro.item
    string='Statutory Regulatory Order Item' args: 'l10n_pk_edi.sro.item'
  • l10n_pk_edi_uom_code Selection
    related='uom_id.l10n_pk_edi_uom_code'
Public methods (0)

No public methods.

New fields (5)
  • l10n_pk_edi_enable Boolean
    help='Enable the Pakistan E-Invoicing features for this company.' string='Enable E-Invoicing(PK)'
  • l10n_pk_edi_production_auth_token Char
    groups='base.group_system' string='E-invoice(PK) Production Authentication Token'
  • l10n_pk_edi_test_auth_token Char
    compute='_compute_l10n_pk_edi_system_params' groups='base.group_system' inverse='_inverse_l10n_pk_edi_test_auth_token' string='E-invoice(PK) Testing Authentication Token'
  • l10n_pk_edi_test_vat Char
    compute='_compute_l10n_pk_edi_system_params' help='Business Identification Number of a registered business, used as the buyer for FBR sandbox scenarios that require one.' inverse='_inverse_l10n_pk_edi_test_vat' string='Registered Business Identification Number'
  • l10n_pk_edi_whitelisted Boolean
    string='FBR IP Whitelisted'
Public methods (1)
  • l10n_pk_edi_run_test_scenarios(self)
    Run all FBR sandbox test scenarios for this company. Returns the list of failed scenario IDs.

New fields (6)
  • l10n_pk_edi_company_email Char
    related='company_id.email' string='Authorized Email'
  • l10n_pk_edi_enable Boolean
    readonly=False related='company_id.l10n_pk_edi_enable'
  • l10n_pk_edi_production_auth_token Char
    readonly=False related='company_id.l10n_pk_edi_production_auth_token'
  • l10n_pk_edi_test_auth_token Char
    readonly=False related='company_id.l10n_pk_edi_test_auth_token'
  • l10n_pk_edi_test_vat Char
    readonly=False related='company_id.l10n_pk_edi_test_vat'
  • l10n_pk_edi_whitelisted Boolean
    related='company_id.l10n_pk_edi_whitelisted'
Public methods (1)
  • action_l10n_pk_edi_run_sandbox_tests(self)

New fields (2)
  • l10n_pk_edi_enable Boolean
    compute='_compute_l10n_pk_edi_enable'
  • l10n_pk_edi_fbr_customer_status Selection
    copy=False default='not_checked' selection=[('not_checked', 'Not Checked'), ('registered', 'Registered'), ('unregistered', 'Unregistered')]
Public methods (1)
  • button_check_fbr_customer_registration(self)

New fields (1)
  • l10n_pk_edi_uom_code Selection
    help='Unit of Measure(UoM) is a standard unit to express quantities of stock or products.' selection=[('3', 'MT'), ('4', 'Bill of lading'), ('5', 'SET'), ('6', 'KWH'), ('8', '40KG'), ('9', 'Liter'), ('11', 'SqY'), ('12', 'Bag'), ('13', 'KG'), ('46', 'MMBTU'), ('48', 'Meter'), ('50', 'Pcs'), ('53', 'Carat'), ('55', 'Cubic Metre'), ('57', 'Dozen'), ('59', 'Gram'), ('61', 'Gallon'), ('63', 'Kilogram'), ('65', 'Pound'), ('67', 'Timber Logs'), ('69', 'Numbers, pieces, units'), ('71', 'Packs'), ('73', 'Pair'), ('75', 'Square Foot'), ('77', 'Square Metre'), ('79', 'Thousand Unit'), ('81', 'Mega Watt'), ('83', 'Foot'), ('85', 'Barrels'), ('87', 'NO'), ('88', 'Others'), ('96', '1000 kWh')] string='FBR UoM Code'
Public methods (0)

No public methods.