mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[FIX] prefill partner in reconciliation widget if it has been match by a reconciliation rule
This commit is contained in:
@@ -269,8 +269,13 @@ class AccountReconciliation(models.AbstractModel):
|
|||||||
and matching_amls[line.id]["model"].id,
|
and matching_amls[line.id]["model"].id,
|
||||||
"write_off": matching_amls[line.id].get("status") == "write_off",
|
"write_off": matching_amls[line.id].get("status") == "write_off",
|
||||||
}
|
}
|
||||||
if not line.partner_id and partner_map.get(line.id):
|
if not line.partner_id:
|
||||||
|
partner = False
|
||||||
|
if matching_amls[line.id].get("partner"):
|
||||||
|
partner = matching_amls[line.id]["partner"]
|
||||||
|
elif partner_map.get(line.id):
|
||||||
partner = self.env["res.partner"].browse(partner_map[line.id])
|
partner = self.env["res.partner"].browse(partner_map[line.id])
|
||||||
|
if partner:
|
||||||
line_vals.update(
|
line_vals.update(
|
||||||
{
|
{
|
||||||
"partner_id": partner.id,
|
"partner_id": partner.id,
|
||||||
|
|||||||
Reference in New Issue
Block a user