Skip to content

Commit 69debbf

Browse files
[IMP] Allow to modify currency_id on account loan
1 parent 214067b commit 69debbf

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

account_loan/models/account_loan.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,7 @@ def _default_company(self):
161161
help="When checked, the first payment will be on start date",
162162
)
163163
currency_id = fields.Many2one(
164-
"res.currency",
165-
compute="_compute_currency",
166-
readonly=True,
164+
"res.currency", compute="_compute_currency", readonly=False, store=True
167165
)
168166
journal_type = fields.Char(compute="_compute_journal_type")
169167
journal_id = fields.Many2one(

account_loan/views/account_loan_view.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,10 @@
149149
attrs="{'invisible': ['|', ('is_leasing', '=', False), ('long_term_loan_account_id', '=', False)]}"
150150
/>
151151
<field name="interest_expenses_account_id" />
152-
<field name="currency_id" invisible="1" />
152+
<field
153+
name="currency_id"
154+
groups="base.group_multi_currency"
155+
/>
153156
</group>
154157
</group>
155158
</page>

0 commit comments

Comments
 (0)