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
[FIX] account: impossible to re-post if post_at_bank_rec #52165
Conversation
OPW 2267661 |
cc @simongoffin |
ping @qdp-odoo |
if self.mapped('line_ids.payment_id'): | ||
if any(self.mapped('journal_id.post_at_bank_rec')): | ||
raise UserError(_("A payment journal entry generated in a journal configured to post entries only when payments are reconciled with a bank statement cannot be manually posted. Those will be posted automatically after performing the bank reconciliation.")) | ||
if self.filtered(lambda x: x.journal_id.post_at_bank_rec).mapped('line_ids.payment_id').filtered(lambda x: x.state in ('draft', 'posted', 'sent')): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fmdl Why no writing .filtered(lambda x: x.state != 'reconciled') instead?
Hello @qdp-odoo Is it ok for you? |
robodoo r+ |
closes #52165 Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
This pull request has forward-port PRs awaiting action (not merged or closed): #52811 |
2 similar comments
This pull request has forward-port PRs awaiting action (not merged or closed): #52811 |
This pull request has forward-port PRs awaiting action (not merged or closed): #52811 |
closes odoo#52165 Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Description of the issue/feature this PR addresses:
--> Issue impossible
Current behavior before PR:
Impossbile to re-post
Desired behavior after PR is merged:
Allow to re-post.
@qdp-odoo
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr