[FIX] account_peppol: Fetch button not showing when after peppol setup

Problem
---------
Directly after setting up peppol, the fetch button on the purchase
journal (in the dashboard) is not showing.

Objective
---------
Make sure the button is shown directly after the journal is set up.

Solution
---------
When setting up peppol, the compute function that computes the peppol
purchase account is triggered. However, this function would not set up
the journal's `is_peppol_journal` to true. Thus, no button was showing.
Adding that line solves the issue.

task-#######

closes odoo/odoo#139293

Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
This commit is contained in:
Antoine Boonen
2023-10-20 16:20:50 +00:00
parent 39b9f72b46
commit 8a5a6dc2fa
@@ -150,6 +150,7 @@ class ResCompany(models.Model):
*self.env['account.journal']._check_company_domain(company),
('type', '=', 'purchase'),
], limit=1)
company.peppol_purchase_journal_id.is_peppol_journal = True
else:
company.peppol_purchase_journal_id = False