Skip to content

Commit

Permalink
[FIX] account_ux: Found possible duplicates
Browse files Browse the repository at this point in the history
Should only be applied to statement lines on the same journal.
Before this change we were wrongly suggestion duplicated because
we were searching across journals.

X-original-commit: 225ae31
  • Loading branch information
zaoral committed Nov 7, 2022
1 parent aacd0c1 commit c748c8d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion account_ux/__manifest__.py
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
'name': 'Account UX',
'version': "15.0.1.7.0",
'version': "15.0.1.8.0",
'category': 'Accounting',
'sequence': 14,
'summary': '',
Expand Down
4 changes: 2 additions & 2 deletions account_ux/data/ir_actions_server_data.xml
Expand Up @@ -17,7 +17,7 @@ for st in records:
dup_groups = 0
while tofix:
st_line = tofix[0]
temp = st_line_obj.search([('ref', '=', st_line.ref), ('date', '=', st_line.date), ('name', '=', st_line.name), ('amount', '=', st_line.amount)])
temp = st_line_obj.search([('ref', '=', st_line.ref), ('date', '=', st_line.date), ('payment_ref', '=', st_line.payment_ref), ('amount', '=', st_line.amount), ('journal_id', '=', st_line.journal_id.id)])
if len(temp) > 1:
dup_groups += 1
temp.write({'duplicated_group': 'Group %03d' % dup_groups})
Expand All @@ -37,7 +37,7 @@ if res:
'context': {'search_default_group_by_duplicated_group': True},
}
else:
raise Warning('We do not found any duplicate')
raise UserError('We do not found any duplicate')
</field>
</record>

Expand Down

0 comments on commit c748c8d

Please sign in to comment.