Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[10.0][FIX] prevent assigning parner with default name #224

Conversation

i-vyshnevska
Copy link
Member

if statement has entries with empty ref (which assign to '/' in odoo) reconciliation widget cannot properly find partner_id, this PR prevents such assignment so user will see initial name given by statement

@i-vyshnevska i-vyshnevska force-pushed the 10-account_bank_statement_import_camt branch 3 times, most recently from f77ef30 to 2d7b427 Compare September 6, 2019 13:01
@i-vyshnevska i-vyshnevska changed the title [10.0][FIX] prevent assigning parner with default ref [10.0][FIX] prevent assigning parner with default name Sep 9, 2019
and this makes search results wrong and partner assignment randomly
"""
recordset = self
if self.env.context.get('no_reassign_empty_ref'):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If https://github.com/odoo/odoo/blob/c7c68bab842aba5300f3a9deec28df6e17b40559/addons/account/models/account_bank_statement.py#L328 is the update you want to avoid, maybe better do so to avoid the write altogether? (we shouldn't have more than one record in self anyway)

if (
    self.env.context.get('no_reassign_empty_ref') 
    and len(self) == 1 
    and len(vals.keys()) == 1 
    and 'partner_id' in vals and 
    and self.name == '/'
): 
    return True

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@grindtildeath thanks, updated

@github-actions
Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Mar 20, 2022
@github-actions github-actions bot closed this Apr 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants