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

TA#69682 [FIX] account_payment_paired_internal_transfert : internal transfer process #3

Open
wants to merge 2 commits into
base: 14.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions account_payment_paired_internal_transfer/__manifest__.py
Copy link
Author

@lanto-razafindrabe lanto-razafindrabe Oct 18, 2024

Choose a reason for hiding this comment

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

The minor version part was set to 3 because of this PR increasing the version to 2

Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

{
"name": "Account Payment Paired Internal Transfer",
"version": "14.0.1.0.1",
"summary": "Crete internal transfers in one move.",
"version": "14.0.1.0.3",
"summary": "Create internal transfers in one move.",
"license": "LGPL-3",
"depends": ["account"],
"author": "Odoo Community Association (OCA), Jarsa, Odoo SA",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright 2021 Jarsa
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

from odoo import _, fields, models
from odoo import _, api, fields, models


class AccountPayment(models.Model):
Expand All @@ -19,6 +19,11 @@ class AccountPayment(models.Model):
"They cross referenced trough this field",
)

@api.onchange("is_internal_transfer")
def _onchange_is_internal_transfer(self):
if self.is_internal_transfer:
self.payment_type = "outbound"

def action_post(self):
res = super().action_post()
self.filtered(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
}"
/>
</xpath>
<xpath expr="//field[@name='payment_type']" position="attributes">
<attribute name="attrs">{'invisible': [('is_internal_transfer', '=', True)]}
</attribute>
</xpath>
</field>
</record>
</odoo>