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

[FIX] account: impossible to re-post if post_at_bank_rec #52165

Closed
wants to merge 1 commit into from

Conversation

fmdl
Copy link
Contributor

@fmdl fmdl commented May 29, 2020

Description of the issue/feature this PR addresses:

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

@fmdl
Copy link
Contributor Author

fmdl commented May 29, 2020

OPW 2267661

@robodoo robodoo added the CI 🤖 Robodoo has seen passing statuses label May 29, 2020
@fmdl
Copy link
Contributor Author

fmdl commented Jun 2, 2020

cc @simongoffin

@fmdl
Copy link
Contributor Author

fmdl commented Jun 3, 2020

ping @qdp-odoo

@simongoffin simongoffin self-requested a review June 4, 2020 10:00
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')):
Copy link
Contributor

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?

@simongoffin
Copy link
Contributor

Hello @qdp-odoo Is it ok for you?

@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Jun 4, 2020
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Jun 4, 2020
@robodoo robodoo removed the CI 🤖 Robodoo has seen passing statuses label Jun 9, 2020
@robodoo robodoo added the CI 🤖 Robodoo has seen passing statuses label Jun 9, 2020
@simongoffin
Copy link
Contributor

robodoo r+

@robodoo robodoo added the r+ 👌 label Jun 9, 2020
robodoo pushed a commit that referenced this pull request Jun 9, 2020
closes #52165

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
@robodoo robodoo closed this Jun 9, 2020
@robodoo robodoo temporarily deployed to merge June 9, 2020 10:58 Inactive
@fw-bot
Copy link
Contributor

fw-bot commented Jun 13, 2020

This pull request has forward-port PRs awaiting action (not merged or closed): #52811

2 similar comments
@fw-bot
Copy link
Contributor

fw-bot commented Jun 14, 2020

This pull request has forward-port PRs awaiting action (not merged or closed): #52811

@fw-bot
Copy link
Contributor

fw-bot commented Jun 15, 2020

This pull request has forward-port PRs awaiting action (not merged or closed): #52811

AdriaGForgeFlow pushed a commit to ForgeFlow/odoo that referenced this pull request Jan 28, 2021
closes odoo#52165

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accounting CI 🤖 Robodoo has seen passing statuses
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants