Skip to content

Commit

Permalink
Merge PR #2352 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by TheMule71
  • Loading branch information
OCA-git-bot committed Sep 17, 2021
2 parents c6c409a + 3c31d03 commit 703002e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def test_08_xml_import(self):
def test_08_xml_import_no_account(self):
"""Check that a useful error message is raised when
the credit account is missing in purchase journal."""
company = self.env.user.company_id
company = self.env.company
journal = self.wizard_model.get_purchase_journal(company)
journal_account = journal.default_account_id
journal.default_account_id = False
Expand Down Expand Up @@ -830,8 +830,8 @@ def test_48_xml_import(self):
self.env["res.partner.bank"].create(
{
"acc_number": "IT59R0100003228000000000622",
"company_id": self.env.user.company_id.id,
"partner_id": self.env.user.company_id.partner_id.id,
"company_id": self.env.company.id,
"partner_id": self.env.company.partner_id.id,
}
)
res = self.run_wizard("test48", "IT01234567890_FPR15.xml")
Expand Down
6 changes: 3 additions & 3 deletions l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ def get_credit_account(self, product=None):
accounts_dict = template.get_product_accounts()
credit_account = accounts_dict["expense"]

company = self.env.user.company_id
company = self.env.company
# Search in purchase journal
journal = self.get_purchase_journal(company)
if not credit_account:
Expand Down Expand Up @@ -1303,7 +1303,7 @@ def set_efatt_rounding(self, FatturaBody, invoice):
if invoice.efatt_rounding != 0:
if invoice.efatt_rounding > 0:
arrotondamenti_account_id = (
self.env.user.company_id.arrotondamenti_passivi_account_id
self.env.company.arrotondamenti_passivi_account_id
)
if not arrotondamenti_account_id:
raise UserError(
Expand All @@ -1312,7 +1312,7 @@ def set_efatt_rounding(self, FatturaBody, invoice):
name = _("Rounding down")
else:
arrotondamenti_account_id = (
self.env.user.company_id.arrotondamenti_attivi_account_id
self.env.company.arrotondamenti_attivi_account_id
)
if not arrotondamenti_account_id:
raise UserError(
Expand Down

0 comments on commit 703002e

Please sign in to comment.