mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP]pms: Allow to search the journal based on the property of the context.
This commit is contained in:
@@ -188,7 +188,9 @@ class AccountMove(models.Model):
|
||||
journal = super(AccountMove, self)._search_default_journal(journal_types)
|
||||
company_id = self._context.get("default_company_id", self.env.company.id)
|
||||
company = self.env["res.company"].browse(company_id)
|
||||
pms_property_id = self.pms_property_id.id or (
|
||||
pms_property_id = self.env.context.get(
|
||||
"default_pms_property_id", self.pms_property_id.id
|
||||
) or (
|
||||
self.env.user.get_active_property_ids
|
||||
and self.env.user.get_active_property_ids()[0]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user