Romania - Account ANAF Sync

l10n_ro_account_anaf_sync
REPOSITORY
REPOSITORYOCA/l10n-romania
GIT
GIThttps://github.com/OCA/l10n-romania.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-romania/tree/17.0/l10n_ro_account_anaf_sync
VERSION
VERSION 1.6.0
CATEGORY
CATEGORYLocalization
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), NextERP Romania
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), NextERP Romania
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, oca-ci, Dorin Hongu, Răzvan Ioan Anastasescu
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-romania
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:20:01
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/l10n-romania:
    - l10n_ro_config
odoo/odoo:
    - l10n_ro
    - account
    - base_setup
    - base
    - web
    - onboarding
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - base_vat
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES PyJWT
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module will make posible to send e-invoice / e-transport to
Romanian goverment anaf.ro.

To use this module you must have a digital signature usb token from
Romania connected with a ANAF account.

Code Analysis

Views touched (4)
XML IDNameModelTypeStatus
redirect_anaf redirect_anaf ir.ui.view qweb New
res_config_settings_view_form res.config.settings.view.form.inherit res.config.settings setting Inherits l10n_ro_config.res_config_settings_view_form
view_l10n_ro_account_anaf_sync_form l10n.ro.account.anaf.sync.form l10n.ro.account.anaf.sync form New
view_l10n_ro_account_anaf_sync_tree l10n.ro.account.anaf.sync.tree l10n.ro.account.anaf.sync tree New
Models touched (3)

New fields (13)
  • access_token Char
    help='Received from ANAF' tracking=1
  • anaf_callback_url Char
    compute='_compute_anaf_callback_url' help='This is the address to set in anaf_portal_url (and will work if is https & accessible form internet)'
  • anaf_oauth_url Char
    default='https://logincert.anaf.ro/anaf-oauth2/v1'
  • anaf_scope_ids One2many → l10n.ro.account.anaf.sync.scope
    comodel_name='l10n.ro.account.anaf.sync.scope' inverse_name='anaf_sync_id'
  • client_id Char
    help='From ANAF site the Oauth id - view the readme' tracking=1
  • client_secret Char
    help='From ANAF site the Oauth id - view the readme' tracking=1
  • client_token_valability Date
    help='Date when is going to expire - 90 days from when was generated' tracking=1
  • code Char
    help='Received from ANAF with this you can take access token and refresh_token' tracking=1
  • company_id Many2one → res.company
    required=True args: 'res.company'
  • last_request_datetime Datetime
    help='Time when was last time pressed the Get Token From Anaf Website. It waits for ANAF request for maximum 1 minute'
  • refresh_token Char
    help='Received from ANAF' tracking=1
  • response_secret Char
    help='A generated secret to know that the response is ok'
  • state Selection
    default='test' args: [('test', 'Test'), ('automatic', 'Automatic')]
Public methods (7)
  • get_token_from_anaf_website(self)
  • handle_anaf_callback(self, authorization_code)
  • name_get(self)
  • refresh_access_token(self)
  • revoke_access_token(self)
  • test_anaf_api(self)
  • write(self, values)

New fields (7)
  • anaf_sync_id Many2one → l10n.ro.account.anaf.sync
    args: 'l10n.ro.account.anaf.sync'
  • anaf_sync_production_url Char
    string='API production URL'
  • anaf_sync_test_url Char
    string='API test URL'
  • anaf_sync_url Char
    compute='_compute_anaf_sync_url'
  • company_id Many2one
    related='anaf_sync_id.company_id' store=True
  • scope Selection
    args: []
  • state Selection
    default='test' args: [('test', 'Test'), ('production', 'Production')]
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/l10n-romania
GIT
GIThttps://github.com/OCA/l10n-romania.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-romania/tree/16.0/l10n_ro_account_anaf_sync
VERSION
VERSION 1.19.0
CATEGORY
CATEGORYLocalization
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), NextERP Romania
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), NextERP Romania
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, Mihai Fekete, oca-ci, Cojocaru Marcel, Dorin Hongu, Stana Natanaela, Larisa-nexterp, diginesis
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-romania
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:53:41
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/l10n-romania:
    - l10n_ro_config
odoo/odoo:
    - l10n_ro
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - base_vat
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES PyJWT
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (4)
XML IDNameModelTypeStatus
redirect_anaf redirect_anaf ir.ui.view qweb New
res_config_settings_view_form res.config.settings.view.form.inherit res.config.settings div Inherits l10n_ro_config.res_config_settings_view_form
view_l10n_ro_account_anaf_sync_form l10n.ro.account.anaf.sync.form l10n.ro.account.anaf.sync form New
view_l10n_ro_account_anaf_sync_tree l10n.ro.account.anaf.sync.tree l10n.ro.account.anaf.sync tree New
Models touched (3)

New fields (13)
  • access_token Char
    help='Received from ANAF' tracking=1
  • anaf_callback_url Char
    compute='_compute_anaf_callback_url' help='This is the address to set in anaf_portal_url (and will work if is https & accessible form internet)'
  • anaf_oauth_url Char
    default='https://logincert.anaf.ro/anaf-oauth2/v1'
  • anaf_scope_ids One2many → l10n.ro.account.anaf.sync.scope
    comodel_name='l10n.ro.account.anaf.sync.scope' inverse_name='anaf_sync_id'
  • client_id Char
    help='From ANAF site the Oauth id - view the readme' tracking=1
  • client_secret Char
    help='From ANAF site the Oauth id - view the readme' tracking=1
  • client_token_valability Date
    help='Date when is going to expire - 90 days from when was generated' tracking=1
  • code Char
    help='Received from ANAF with this you can take access token and refresh_token' tracking=1
  • company_id Many2one → res.company
    required=True args: 'res.company'
  • last_request_datetime Datetime
    help='Time when was last time pressed the Get Token From Anaf Website. It waits for ANAF request for maximum 1 minute'
  • refresh_token Char
    help='Received from ANAF' tracking=1
  • response_secret Char
    help='A generated secret to know that the response is ok'
  • state Selection
    default='test' args: [('test', 'Test'), ('automatic', 'Automatic')]
Public methods (9)
  • cron_send_expiration_token_message(self, anaf_sync=False)
    @api.model
    Cron to send post message to user if token expire.
  • get_token_from_anaf_website(self)
  • handle_anaf_callback(self, authorization_code)
  • name_get(self)
  • refresh_access_token(self)
  • revoke_access_token(self)
  • send_expiration_token_message(self)
    Send message to user when token is about to expiry, 7 days before the expiry date, but can be changed from ir.config.parameter with value `l10n_ro_account_anaf_sync.token_valability_days`.
  • test_anaf_api(self)
  • write(self, values)

New fields (7)
  • anaf_sync_id Many2one → l10n.ro.account.anaf.sync
    args: 'l10n.ro.account.anaf.sync'
  • anaf_sync_production_url Char
    string='API production URL'
  • anaf_sync_test_url Char
    string='API test URL'
  • anaf_sync_url Char
    compute='_compute_anaf_sync_url'
  • company_id Many2one
    related='anaf_sync_id.company_id' store=True
  • scope Selection
    args: []
  • state Selection
    default='test' args: [('test', 'Test'), ('production', 'Production')]
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/l10n-romania
GIT
GIThttps://github.com/OCA/l10n-romania.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-romania/tree/15.0/l10n_ro_account_anaf_sync
VERSION
VERSION 1.17.0
CATEGORY
CATEGORYLocalization
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), NextERP Romania
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), NextERP Romania
COMMITTERS
COMMITTERSGitHub, Weblate, OCA-git-bot, Mihai Fekete, oca-ci, Dorin Hongu, Adrian Vacaru, Stana Natanaela, Lorincz Barni
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-romania
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:46:30
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/l10n-romania:
    - l10n_ro_config
odoo/odoo:
    - l10n_ro
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - base_vat
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES PyJWT
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (4)
XML IDNameModelTypeStatus
redirect_anaf redirect_anaf ir.ui.view qweb New
res_config_settings_view_form res.config.settings.view.form.inherit res.config.settings div Inherits l10n_ro_config.res_config_settings_view_form
view_l10n_ro_account_anaf_sync_form l10n.ro.account.anaf.sync.form l10n.ro.account.anaf.sync form New
view_l10n_ro_account_anaf_sync_tree l10n.ro.account.anaf.sync.tree l10n.ro.account.anaf.sync tree New
Models touched (3)

New fields (14)
  • access_token Char
    help='Received from ANAF' tracking=1
  • anaf_callback_url Char
    compute='_compute_anaf_callback_url' help='This is the address to set in anaf_portal_url (and will work if is https & accessible form internet)'
  • anaf_oauth_url Char
    default='https://logincert.anaf.ro/anaf-oauth2/v1'
  • anaf_scope_ids One2many → l10n.ro.account.anaf.sync.scope
    comodel_name='l10n.ro.account.anaf.sync.scope' inverse_name='anaf_sync_id'
  • auto_refresh_access_token Boolean
    default=True string='Auto-Refresh access token'
  • client_id Char
    help='From ANAF site the Oauth id - view the readme' tracking=1
  • client_secret Char
    help='From ANAF site the Oauth id - view the readme' tracking=1
  • client_token_valability Date
    help='Date when is going to expire - 90 days from when was generated' tracking=1
  • code Char
    help='Received from ANAF with this you can take access token and refresh_token' tracking=1
  • company_id Many2one → res.company
    required=True args: 'res.company'
  • last_request_datetime Datetime
    help='Time when was last time pressed the Get Token From Anaf Website. It waits for ANAF request for maximum 1 minute'
  • refresh_token Char
    help='Received from ANAF' tracking=1
  • response_secret Char
    help='A generated secret to know that the response is ok'
  • state Selection
    default='test' args: [('test', 'Test'), ('automatic', 'Automatic')]
Public methods (8)
  • action_auto_refresh_access_token(self)
  • get_token_from_anaf_website(self)
  • handle_anaf_callback(self, authorization_code)
  • name_get(self)
  • refresh_access_token(self)
  • revoke_access_token(self)
  • test_anaf_api(self)
  • write(self, values)

New fields (7)
  • anaf_sync_id Many2one → l10n.ro.account.anaf.sync
    args: 'l10n.ro.account.anaf.sync'
  • anaf_sync_production_url Char
    string='API production URL'
  • anaf_sync_test_url Char
    string='API test URL'
  • anaf_sync_url Char
    compute='_compute_anaf_sync_url'
  • company_id Many2one
    related='anaf_sync_id.company_id' store=True
  • scope Selection
    args: []
  • state Selection
    default='test' args: [('test', 'Test'), ('production', 'Production')]
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/l10n-romania
GIT
GIThttps://github.com/OCA/l10n-romania.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-romania/tree/14.0/l10n_ro_account_anaf_sync
VERSION
VERSION 1.19.1
CATEGORY
CATEGORYLocalization
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), NextERP Romania
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), NextERP Romania
COMMITTERS
COMMITTERSGitHub, Weblate, OCA-git-bot, Mihai Fekete, oca-ci, Dorin Hongu, Adrian Vacaru, Stana Natanaela
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-romania
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:40:51
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/l10n-romania:
    - l10n_ro_config
odoo/odoo:
    - l10n_ro
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - base_vat
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES PyJWT
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (4)
XML IDNameModelTypeStatus
redirect_anaf redirect_anaf ir.ui.view qweb New
res_config_settings_view_form res.config.settings.view.form.inherit res.config.settings div Inherits l10n_ro_config.res_config_settings_view_form
view_l10n_ro_account_anaf_sync_form l10n.ro.account.anaf.sync.form l10n.ro.account.anaf.sync form New
view_l10n_ro_account_anaf_sync_tree l10n.ro.account.anaf.sync.tree l10n.ro.account.anaf.sync tree New
Models touched (3)

New fields (13)
  • access_token Char
    help='Received from ANAF' tracking=1
  • anaf_callback_url Char
    compute='_compute_anaf_callback_url' help='This is the address to set in anaf_portal_url (and will work if is https & accessible form internet)'
  • anaf_oauth_url Char
    default='https://logincert.anaf.ro/anaf-oauth2/v1'
  • anaf_scope_ids One2many → l10n.ro.account.anaf.sync.scope
    comodel_name='l10n.ro.account.anaf.sync.scope' inverse_name='anaf_sync_id'
  • client_id Char
    help='From ANAF site the Oauth id - view the readme' tracking=1
  • client_secret Char
    help='From ANAF site the Oauth id - view the readme' tracking=1
  • client_token_valability Date
    help='Date when is going to expire - 90 days from when was generated' tracking=1
  • code Char
    help='Received from ANAF with this you can take access token and refresh_token' tracking=1
  • company_id Many2one → res.company
    required=True args: 'res.company'
  • last_request_datetime Datetime
    help='Time when was last time pressed the Get Token From Anaf Website. It waits for ANAF request for maximum 1 minute'
  • refresh_token Char
    help='Received from ANAF' tracking=1
  • response_secret Char
    help='A generated secret to know that the response is ok'
  • state Selection
    default='test' args: [('test', 'Test'), ('automatic', 'Automatic')]
Public methods (7)
  • get_token_from_anaf_website(self)
  • handle_anaf_callback(self, authorization_code)
  • name_get(self)
  • refresh_access_token(self)
  • revoke_access_token(self)
  • test_anaf_api(self)
  • write(self, values)

New fields (7)
  • anaf_sync_id Many2one → l10n.ro.account.anaf.sync
    args: 'l10n.ro.account.anaf.sync'
  • anaf_sync_production_url Char
    string='API production URL'
  • anaf_sync_test_url Char
    string='API test URL'
  • anaf_sync_url Char
    compute='_compute_anaf_sync_url'
  • company_id Many2one
    related='anaf_sync_id.company_id' store=True
  • scope Selection
    args: []
  • state Selection
    default='test' args: [('test', 'Test'), ('production', 'Production')]
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.