mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
Bunch of fixes and small improvements on modules: account_statement_base_completion, account_statement_completion_voucher, account_statement_ext, account_advanced_reconcile, account_statement_base_import
[IMP] Set a default account on a new bank statement line when manual entry [ADD] basic security rules on profile and completion rules [ADD] account_statement_completion_voucher to better adapt the views of bank statement [FIX] Call to the completion button [FIX] Auto-launch completion after import [FIX] inherit view [merge] [FIX] account_advanced_reconcile: improved view readability with less larger column [FIX] account_advanced_reconcile: improved view readability with less larger column [FIX] count of reconciliations was incorrect for partial reconciliations (lp:c2c-financial-addons/6.1 rev 70)
This commit is contained in:
@@ -515,6 +515,9 @@ class AccountBankSatementLine(Model):
|
||||
periods = self.pool.get('account.period').find(cursor, user, dt=date)
|
||||
return periods and periods[0] or False
|
||||
|
||||
def _get_default_account(self, cursor, user, context=None):
|
||||
return self.get_values_for_line(cursor, user, context = context)['account_id']
|
||||
|
||||
_columns = {
|
||||
# Set them as required + 64 char instead of 32
|
||||
'ref': fields.char('Reference', size=64, required=True),
|
||||
@@ -522,6 +525,7 @@ class AccountBankSatementLine(Model):
|
||||
}
|
||||
_defaults = {
|
||||
'period_id': _get_period,
|
||||
'account_id': _get_default_account,
|
||||
}
|
||||
|
||||
def get_values_for_line(self, cr, uid, profile_id = False, partner_id = False, line_type = False, amount = False, context = None):
|
||||
|
||||
Reference in New Issue
Block a user