Account Forex Spot

account_fx_spot
REPOSITORY
REPOSITORYOCA/currency
GIT
GIThttps://github.com/OCA/currency.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/currency/tree/11.0/account_fx_spot
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYAccounting
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Eficent
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Eficent
COMMITTERS
COMMITTERSLois Rilo, OCA Transbot, oca-travis, Weblate
WEBSITE
WEBSITEhttps://github.com/OCA/account-financial-tools
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:24:02
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
    - account
    - base_setup
    - web
    - product
    - decimal_precision
    - mail
    - bus
    - web_tour
    - analytic
    - web_planner
    - portal
    - http_routing
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
view_account_fx_spot_form account.fx.spot.form account.fx.spot form New
view_account_fx_spot_search account.fx.spot.search account.fx.spot search New
view_account_fx_spot_tree account.fx.spot.tree account.fx.spot tree New
view_account_payment_form account.payment.form - account_fx_spot account.payment div Inherits account.view_account_payment_form
view_account_payment_from_fx_spot account.fx.spot.payment.wizard account.fx.spot.payment form New
Models touched (3)

New fields (24)
  • amount_in Monetary
    currency_field='in_currency_id' readonly=True required=True states={'draft': [('readonly', False)]} string='Received Amount'
  • amount_out Monetary
    currency_field='out_currency_id' readonly=True required=True states={'draft': [('readonly', False)]} string='Issued Amount'
  • comment Text
    readonly=True states={'draft': [('readonly', False)]} string='Additional Information'
  • commercial_partner_id Many2one
    compute_sudo=True readonly=True related='partner_id.commercial_partner_id' store=True
  • company_currency_id Many2one
    related='company_id.currency_id'
  • company_id Many2one → res.company
    change_default=True comodel_name='res.company' default=<expr> readonly=True required=True states={'draft': [('readonly', False)]} string='Company'
  • date_transaction Date
    copy=False default=fields.Date.today() help='Keep empty to use the current date' index=True readonly=True states={'draft': [('readonly', False)]} string='Transaction Date'
  • in_currency_id Many2one → res.currency
    comodel_name='res.currency' readonly=True required=True states={'draft': [('readonly', False)]} string='Incoming Currency'
  • journal_id Many2one → account.journal
    comodel_name='account.journal' default=<expr> readonly=True required=True states={'draft': [('readonly', False)]} string='Journal'
  • move_id Many2one → account.move
    comodel_name='account.move' copy=False readonly=True string='Journal Entry'
  • name Char
    copy=False index=True readonly=True string='Reference'
  • out_currency_id Many2one → res.currency
    comodel_name='res.currency' readonly=True required=True states={'draft': [('readonly', False)]} string='Outgoing Currency'
  • partner_id Many2one → res.partner
    change_default=True comodel_name='res.partner' readonly=True required=True states={'draft': [('readonly', False)]} string='Partner' track_visibility='always'
  • payment_ids Many2many → account.payment
    column1='fx_spot_id' column2='payment_id' comodel_name='account.payment' copy=False readonly=True relation='account_fx_spot_payment_rel' string='Payments'
  • payment_move_line_ids Many2many → account.move.line
    comodel_name='account.move.line' compute='_compute_payments' store=True string='Payment Move Lines'
  • payments_count Integer
    compute='_compute_payments_count' string='Payments count'
  • rate Float
    compute='_compute_rate' digits=dp.get_precision('Exchange Rate') readonly=True
  • rate_inv Float
    compute='_compute_rate' digits=dp.get_precision('Exchange Rate') readonly=True string='Rate Inverted'
  • reconciled Boolean
    compute='_compute_residual' readonly=True store=True string='Paid/Reconciled'
  • residual_company_in Monetary
    compute='_compute_residual' currency_field='company_currency_id' readonly=True store=True string='Remaining amount to receive in company currency'
  • residual_company_out Monetary
    compute='_compute_residual' currency_field='company_currency_id' readonly=True store=True string='Remaining amount due in company currency'
  • residual_in Monetary
    compute='_compute_residual' currency_field='in_currency_id' readonly=True store=True string='Remaining amount to receive'
  • residual_out Monetary
    compute='_compute_residual' currency_field='out_currency_id' readonly=True store=True string='Remaining amount due'
  • state Selection
    default='draft' index=True readonly=True selection=[('draft', 'Draft'), ('open', 'Open'), ('done', 'Done'), ('cancel', 'Cancelled')] string='Status'
Public methods (8)
  • action_cancel(self)
    @api.multi
  • action_confirm(self)
  • action_done(self)
    @api.multi
  • action_draft(self)
    @api.multi
  • action_re_open(self)
    @api.multi
  • action_view_payments(self)
  • create(self, vals)
    @api.model
  • register_payment(self, payment_line, writeoff_acc_id=False, writeoff_journal_id=False)
    @api.multi
    Reconcile payable/receivable lines from the transaction with payment_line.

New fields (3)
  • fx_spot_ids Many2many → account.fx.spot
    comodel_name='account.fx.spot' copy=False string='Foreign Exchange Spot Transaction'
  • multi Boolean
    help='Technical field indicating if the user selected transactions from multiple partners or from different types.' string='Multi'
  • payment_type Selection
    default=default_type
Public methods (5)
  • create_payments(self)
    @api.multi
    Create payments according to the transactions. Having transactions with different commercial_partner_id leads to multiple payments. In case of all the transactions are related to the same commercial_partner_id, only one payment will be created. :return: The ir.actions.act_window to show created payments.
  • default_get(self, fields)
    @api.model
  • default_type(self)
    @api.multi
  • get_payments_vals(self)
    @api.multi
    Compute the values for payments. :return: a list of payment values (dictionary).
  • onchange_payment_type(self)
    @api.onchange('payment_type')

New fields (2)
  • fx_spot_ids Many2many → account.fx.spot
    column1='payment_id' column2='fx_spot_id' comodel_name='account.fx.spot' copy=False readonly=True relation='account_fx_spot_payment_rel' string='Foreign Exchange Spot Transaction'
  • has_fx_spots Boolean
    compute='_compute_has_fx_spots' help='Technical field for usability purposes'
Public methods (1)
  • button_fx_spot(self)
    @api.multi