mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
Correct version number, api.one and security rules
This commit is contained in:
@@ -44,8 +44,7 @@ Bug Tracker
|
||||
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/bank-statement-reconcile/issues>`_.
|
||||
In case of trouble, please check there if your issue has already been reported.
|
||||
If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
|
||||
`here <https://github.com/OCA/bank-statement-reconcile/issues/new?body=module:%20account_mass_reconcile%0Aversion:%209.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
If you spotted it first, help us smashing it by providing a detailed and welcomed feedback.
|
||||
|
||||
|
||||
Credits
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
{
|
||||
"name": "Mass Reconcile",
|
||||
"version": "9.0.1.3.1",
|
||||
"version": "9.0.1.0.0",
|
||||
"depends": ["account", "account_full_reconcile"],
|
||||
"author": "Akretion,Camptocamp,Odoo Community Association (OCA)",
|
||||
"website": "http://www.akretion.com/",
|
||||
|
||||
@@ -97,26 +97,28 @@ class AccountMassReconcile(models.Model):
|
||||
_inherit = ['mail.thread']
|
||||
_description = 'account mass reconcile'
|
||||
|
||||
@api.one
|
||||
@api.multi
|
||||
@api.depends('account')
|
||||
def _get_total_unrec(self):
|
||||
obj_move_line = self.env['account.move.line']
|
||||
self.unreconciled_count = obj_move_line.search_count(
|
||||
[('account_id', '=', self.account.id),
|
||||
('reconciled', '=', False)])
|
||||
for rec in self:
|
||||
rec.unreconciled_count = obj_move_line.search_count(
|
||||
[('account_id', '=', rec.account.id),
|
||||
('reconciled', '=', False)])
|
||||
|
||||
@api.one
|
||||
@api.multi
|
||||
@api.depends('history_ids')
|
||||
def _last_history(self):
|
||||
# do a search() for retrieving the latest history line,
|
||||
# as a read() will badly split the list of ids with 'date desc'
|
||||
# and return the wrong result.
|
||||
history_obj = self.env['mass.reconcile.history']
|
||||
last_history_rs = history_obj.search(
|
||||
[('mass_reconcile_id', '=', self.id)],
|
||||
limit=1, order='date desc'
|
||||
)
|
||||
self.last_history = last_history_rs or False
|
||||
for rec in self:
|
||||
last_history_rs = history_obj.search(
|
||||
[('mass_reconcile_id', '=', rec.id)],
|
||||
limit=1, order='date desc'
|
||||
)
|
||||
rec.last_history = last_history_rs or False
|
||||
|
||||
name = fields.Char(string='Name', required=True)
|
||||
account = fields.Many2one('account.account',
|
||||
|
||||
@@ -13,14 +13,13 @@ class MassReconcileHistory(models.Model):
|
||||
_rec_name = 'mass_reconcile_id'
|
||||
_order = 'date DESC'
|
||||
|
||||
@api.one
|
||||
@api.multi
|
||||
@api.depends('reconcile_ids')
|
||||
def _get_reconcile_line_ids(self):
|
||||
move_line_ids = []
|
||||
for reconcile in self.reconcile_ids:
|
||||
move_lines = reconcile.mapped('reconciled_line_ids')
|
||||
move_line_ids.extend(move_lines.ids)
|
||||
self.reconcile_line_ids = move_line_ids
|
||||
for rec in self:
|
||||
rec.reconcile_line_ids = rec.mapped(
|
||||
'reconcile_ids.reconciled_line_ids'
|
||||
).ids
|
||||
|
||||
mass_reconcile_id = fields.Many2one(
|
||||
'account.mass.reconcile',
|
||||
|
||||
@@ -2,8 +2,8 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_mass_reconcile_options_acc_user,mass.reconcile.options,model_mass_reconcile_options,account.group_account_user,1,0,0,0
|
||||
access_account_mass_reconcile_method_acc_user,account.mass.reconcile.method,model_account_mass_reconcile_method,account.group_account_user,1,0,0,0
|
||||
access_account_mass_reconcile_acc_user,account.mass.reconcile,model_account_mass_reconcile,account.group_account_user,1,1,0,0
|
||||
access_mass_reconcile_options_acc_mgr,mass.reconcile.options,model_mass_reconcile_options,account.group_account_user,1,0,0,0
|
||||
access_account_mass_reconcile_method_acc_mgr,account.mass.reconcile.method,model_account_mass_reconcile_method,account.group_account_user,1,1,1,1
|
||||
access_account_mass_reconcile_acc_mgr,account.mass.reconcile,model_account_mass_reconcile,account.group_account_user,1,1,1,1
|
||||
access_mass_reconcile_options_acc_mgr,mass.reconcile.options,model_mass_reconcile_options,account.group_account_manager,1,0,0,0
|
||||
access_account_mass_reconcile_method_acc_mgr,account.mass.reconcile.method,model_account_mass_reconcile_method,account.group_account_manager,1,1,1,1
|
||||
access_account_mass_reconcile_acc_mgr,account.mass.reconcile,model_account_mass_reconcile,account.group_account_manager,1,1,1,1
|
||||
access_mass_reconcile_history_acc_user,mass.reconcile.history,model_mass_reconcile_history,account.group_account_user,1,1,1,0
|
||||
access_mass_reconcile_history_acc_mgr,mass.reconcile.history,model_mass_reconcile_history,account.group_account_manager,1,1,1,1
|
||||
|
||||
|
Reference in New Issue
Block a user