mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[FIX] pylint redefined-outer-name
This commit is contained in:
@@ -106,12 +106,12 @@ class account_move(orm.Model):
|
||||
], context=context)
|
||||
|
||||
for move in self.browse(cr, uid, move_ids, context=context):
|
||||
job = storage.load(move.post_job_uuid)
|
||||
if job.state in (u'pending', u'enqueued'):
|
||||
job.set_done(result=_(
|
||||
job_rec = storage.load(move.post_job_uuid)
|
||||
if job_rec.state in (u'pending', u'enqueued'):
|
||||
job_rec.set_done(result=_(
|
||||
u'Task set to Done because the user unmarked the move'
|
||||
))
|
||||
storage.store(job)
|
||||
storage.store(job_rec)
|
||||
|
||||
def mark_for_posting(self, cr, uid, move_ids, eta=None, context=None):
|
||||
"""Mark a list of moves for delayed posting, and enqueue the jobs."""
|
||||
|
||||
@@ -27,12 +27,12 @@ class res_company(orm.Model):
|
||||
def _multi_curr_enable(self, cr, uid, ids, field_name, arg, context=None):
|
||||
"check if multi company currency is enabled"
|
||||
result = {}
|
||||
fields = self.pool.get('ir.model.fields').search(
|
||||
field_ids = self.pool.get('ir.model.fields').search(
|
||||
cr, uid,
|
||||
[('name', '=', 'company_id'),
|
||||
('model', '=', 'res.currency')]
|
||||
)
|
||||
if not fields:
|
||||
if not field_ids:
|
||||
enable = 0
|
||||
else:
|
||||
enable = 1
|
||||
|
||||
Reference in New Issue
Block a user