TIP: You can type at any time to perform a new search.
Account Constraints
account_constraints · OCA/account-financial-tools
- Repository
- OCA/account-financial-tools · module folder · Try on Runboat
- Module version
- 1.1.0
- Category
- Generic Modules/Accounting
- Folder size
- 0.18 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- http://www.camptocamp.com
- Last tracking update
- 2026-08-07 07:17:46
- Authors
- Camptocamp, Odoo Community Association (OCA)
- Maintainers
- Camptocamp, Odoo Community Association (OCA)
- Committers
- Pedro M. Baeza, Stéphane Bidoul (ACSONE)
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- account_default_draft_move
- Description
Account Constraints =================== Add constraints in the accounting module of OpenERP to avoid bad usage by users that lead to corrupted datas. This is based on our experiences and legal state of the art in other software. Summary of constraints are: * Add a constraint on account move: you cannot pickup a date that is not in the fiscal year of the concerned period (configurable per journal) * For manual entries when multicurrency: a. Validation on the use of the 'Currency' and 'Currency Amount' fields as it is possible to enter one without the other b. Validation to prevent a Credit amount with a positive 'Currency Amount', or a Debit with a negative 'Currency Amount' * Add a check on entries that user cannot provide a secondary currency if the same than the company one. * Remove the possibility to modify or delete a move line related to an invoice or a bank statement, no matter what the status of the move (draft, validated or posted). This is useful in a standard context but even more if you're using `account_default_draft_move`. This way you ensure that the user cannot make mistakes even in draft state, he must pass through the parent object to make his modification. Contributors * Stéphane Bidoul <stephane.bidoul@acsone.eu>
Code Analysis ⓘ
Views touched (2)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
bank_statement_cancel_form_inherit |
bank.statement.cancel.form.inherit | account.bank.statement | form | Inherits account.view_bank_statement_form |
view_account_journal_allow_date_fy |
account.journal.allow_date_fy | account.journal | form | Inherits account.view_account_journal_form |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (6)
New fields (0)
No new fields.
Public methods (2)-
button_cancel(self)@api.multiOverride the method to add the key 'from_parent_object' in the context. This is to allow to delete move line related to bank statement through the cancel button. -
button_confirm_bank(self)@api.multiAdd the from_parent_object key in context in order to be able to post the move.
New fields (2)
-
account_cancel_installedBooleancompute='_is_account_cancel_installed'string='Allow Cancelling Entries' -
stateSelectiondefault='draft'related='statement_id.state'string='Statement state'
-
cancel(self)@api.multi -
process_reconciliation(self, mv_line_dicts)@api.multiAdd the from_parent_object key in context in order to be able to balanced the move.
New fields (0)
No new fields.
Public methods (2)-
action_cancel(self)@api.multiOverride the method to add the key 'from_parent_object' in the context. This is to allow to delete move line related to invoice through the cancel button. -
action_move_create(self)@api.multiOverride the method to add the key 'from_parent_object' in the context.
New fields (1)
-
allow_date_fyBooleandefault=Truehelp='If set to True then do not accept the entry if the entry date is not into the fiscal year dates'string='Check Date in Fiscal Year'
No public methods.
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (0)
No new fields.
Public methods (2)-
unlink(self, cr, uid, ids, context=None, check=True)@api.cr_uid_ids_contextAdd the following checks: - Is the move related to an invoice - Is the move related to a bank statement - Is other values than reconcile_partial_id and/or reconcile_id modified In that case, we forbid the move to be deleted even if draft. We should never delete directly a move line related or generated by another object. This is mandatory if you use the module setting all moves in draft (module: account_default_draft_move) -
write(self, cr, uid, ids, vals, context=None, check=True, update_check=True)@api.cr_uid_ids_contextAdd the following checks: - Is the move related to an invoice - Is the move related to a bank statement - Is other values than reconcile_partial_id and/or reconcile_id modified In that case, we forbid the move to be modified even if draft. We should never update directly a move line related or generated by another object. This is mandatory if you use the module setting all moves in draft (module: account_default_draft_move)
Loading…
Loading…
Loading…
Loading…