Skip to content

Commit

Permalink
account_check_deposit: add check_company=True on fields that need it
Browse files Browse the repository at this point in the history
  • Loading branch information
alexis-via committed Dec 24, 2020
1 parent cad8dcd commit 441adc2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion account_check_deposit/models/account_check_deposit.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class AccountCheckDeposit(models.Model):
_name = "account.check.deposit"
_description = "Account Check Deposit"
_order = "deposit_date desc"
_check_company_auto = True

@api.depends(
"company_id",
Expand Down Expand Up @@ -73,6 +74,7 @@ def _compute_check_deposit(self):
string="Journal",
domain=[("type", "=", "bank"), ("bank_account_id", "=", False)],
required=True,
check_company=True,
states={"done": [("readonly", "=", True)]},
)
journal_default_account_id = fields.Many2one(
Expand All @@ -93,14 +95,16 @@ def _compute_check_deposit(self):
readonly=True,
)
move_id = fields.Many2one(
comodel_name="account.move", string="Journal Entry", readonly=True
comodel_name="account.move", string="Journal Entry", readonly=True,
check_company=True,
)
bank_journal_id = fields.Many2one(
comodel_name="account.journal",
string="Bank Account",
required=True,
domain="[('company_id', '=', company_id), ('type', '=', 'bank'), "
"('bank_account_id', '!=', False)]",
check_company=True,
states={"done": [("readonly", "=", True)]},
)
line_ids = fields.One2many(
Expand Down
1 change: 1 addition & 0 deletions account_check_deposit/models/account_move_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ class AccountMoveLine(models.Model):
comodel_name="account.check.deposit",
string="Check Deposit",
copy=False,
check_company=True,
)

0 comments on commit 441adc2

Please sign in to comment.