Skip to content

Commit

Permalink
[FIX] fiscal_company_point_of_sale: do no raise an error, if there is…
Browse files Browse the repository at this point in the history
… no journals defined on pos.config model
  • Loading branch information
legalsylvain committed Nov 7, 2024
1 parent 8c16c66 commit 2160e57
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fiscal_company_point_of_sale/models/pos_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ def _check_company_journal(self):

@api.constrains("company_id", "journal_ids")
def _check_company_payment(self):
if self.mapped("journal_ids.company_id.fiscal_company_id.id") != [
self.company_id.fiscal_company_id.id
]:
if self.mapped("journal_ids") and self.mapped(
"journal_ids.company_id.fiscal_company_id.id"
) != [self.company_id.fiscal_company_id.id]:
raise ValidationError(
_(
"The companies of the method payments and the company of the point of sale"
Expand Down

0 comments on commit 2160e57

Please sign in to comment.