[FIX]Account Check Deposit fixes
* Use correct accounts for reconciliation and collect ; * Repair group read for amount currency ; * View fix for o2m field.
This commit is contained in:
parent
1661dbfc0d
commit
50f82b2378
@ -7,7 +7,7 @@
|
||||
|
||||
{
|
||||
"name": "Account Check Deposit",
|
||||
"version": "16.0.1.0.0",
|
||||
"version": "16.0.1.0.1",
|
||||
"category": "Accounting",
|
||||
"license": "AGPL-3",
|
||||
"summary": "Manage deposit of checks to the bank",
|
||||
|
@ -118,7 +118,7 @@ class AccountCheckDeposit(models.Model):
|
||||
def _compute_check_deposit(self):
|
||||
rg_res = self.env["account.move.line"].read_group(
|
||||
[("check_deposit_id", "in", self.ids)],
|
||||
["check_deposit_id", "debit", "amount_currency"],
|
||||
["check_deposit_id", "debit", "amount_currency:sum"],
|
||||
["check_deposit_id"],
|
||||
)
|
||||
mapped_data = {
|
||||
@ -147,6 +147,8 @@ class AccountCheckDeposit(models.Model):
|
||||
account = rec.journal_id.inbound_payment_method_line_ids.filtered(
|
||||
lambda line: line.payment_method_id.code == "manual"
|
||||
).payment_account_id
|
||||
if not account:
|
||||
account = self.company_id.account_journal_payment_debit_account_id.id
|
||||
rec.in_hand_check_account_id = account
|
||||
|
||||
@api.model
|
||||
@ -248,8 +250,8 @@ class AccountCheckDeposit(models.Model):
|
||||
if line.payment_method_id.code == "manual" and line.payment_account_id:
|
||||
account_id = line.payment_account_id.id
|
||||
break
|
||||
if not account_id:
|
||||
account_id = self.company_id.account_journal_payment_debit_account_id.id
|
||||
if not account_id and self.bank_journal_id.default_account_id:
|
||||
account_id = self.bank_journal_id.default_account_id.id
|
||||
if not account_id:
|
||||
raise UserError(
|
||||
_("Missing 'Outstanding Receipts Account' on the company '%s'.")
|
||||
|
@ -65,7 +65,7 @@
|
||||
<field name="move_id" />
|
||||
</group>
|
||||
</group>
|
||||
<group string="Check Payments" name="check_payments">
|
||||
<group string="Check Payments" name="check_payments" col="1">
|
||||
<field
|
||||
name="check_payment_ids"
|
||||
nolabel="1"
|
||||
|
Loading…
Reference in New Issue
Block a user