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:
@@ -72,6 +72,7 @@
|
||||
'statement_view.xml',
|
||||
'report/bank_statement_webkit_header.xml',
|
||||
'report.xml',
|
||||
'security/ir.model.access.csv',
|
||||
],
|
||||
'demo_xml': [],
|
||||
'test': [],
|
||||
|
||||
3
account_statement_ext/security/ir.model.access.csv
Normal file
3
account_statement_ext/security/ir.model.access.csv
Normal file
@@ -0,0 +1,3 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_account_bank_st_profile_user,account.statement.profil,model_account_statement_profil,account.group_account_user,1,0,0,0
|
||||
access_account_bank_st_profile_manager,account.statement.profil,model_account_statement_profil,account.group_account_manager,1,1,1,1
|
||||
|
@@ -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):
|
||||
|
||||
@@ -139,12 +139,11 @@
|
||||
<!-- Add a new group before the first one with name, profil and date -->
|
||||
<xpath expr="/form/group[@col='7']" position="before">
|
||||
<group col="8" colspan="4">
|
||||
<field name="id" select="1" readonly="1"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="profile_id" select="1" required="1" on_change="onchange_imp_config_id(profile_id)" widget="selection"/>
|
||||
<field name="date" select="1" on_change="onchange_date(date, company_id)"/>
|
||||
<field name="name" select="1"/>
|
||||
</group>
|
||||
<separator string="Details" colspan="4"/>
|
||||
<separator string="Profile Details" colspan="4"/>
|
||||
</xpath>
|
||||
<!-- Make balance visible or not depending on profil -->
|
||||
<xpath expr="/form/group/field[@name='balance_start']" position="replace">
|
||||
|
||||
Reference in New Issue
Block a user