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: Remove partner on changing partner_type or payment_type #32069
Conversation
@@ -486,6 +486,7 @@ def _compute_reconciled_invoice_ids(self): | |||
@api.onchange('partner_type') | |||
def _onchange_partner_type(self): | |||
self.ensure_one() | |||
self.partner_id = False |
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.
Why not self.env["res.partner"]
as an empty record?
Does it makes any difference? (Can you explain if it makes any)
|
The difference is that |
Thanks |
Ping @qdp-odoo |
I dunno |
Or Maybe @mart-e can verify. |
or Maybe someone from accounting team ✋ |
If your partner is both a customer/vendor, why removing it? |
Ideally, Partner shouldn't be removed but handling that case would be too much for Stable version. IMO, This is enough to Prevent wrong Payment where Customer/Supplier are Identical. @smetl Do you want me to go ahead and fix this entirely ? (To handle the case where Partner is Customer and Supplier) |
Let's check with @avw-odoo |
@avw-odoo Can you please look into that? (At least for v13) |
@sswapnesh In 13.0, partner_type disappeared (customer & vendor) |
Oh yes, You are Right. |
Actually this was for 12.0 |
@sswapnesh Discussed with @avw-odoo . We decide to not change the actual behavior. |
Description of the issue/feature this PR addresses: Account module (Customer/Vendor Payment)
Current behavior before PR:
Still Customer is there which should be removed as Partner Type is changed now
Desired behavior after PR is merged: Remove partner when
partner_type
orpayment_type
is changed--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr