Skip to content

Commit

Permalink
Merge PR #637 into 17.0
Browse files Browse the repository at this point in the history
Signed-off-by sbidoul
  • Loading branch information
OCA-git-bot committed Oct 5, 2024
2 parents e7bcc49 + 9ee0746 commit 15e740a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mis_builder_budget/models/mis_budget_by_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class MisBudgetByAccount(models.Model):
item_ids = fields.One2many(
comodel_name="mis.budget.by.account.item", inverse_name="budget_id", copy=True
)
company_id = fields.Many2one(required=True)
company_id = fields.Many2one(required=False)
allow_items_overlap = fields.Boolean(
help="If checked, overlap between budget items is allowed"
)
6 changes: 3 additions & 3 deletions mis_builder_budget/models/mis_budget_by_account_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ class MisBudgetByAccountItem(models.Model):
)
company_id = fields.Many2one(
"res.company",
related="budget_id.company_id",
related="account_id.company_id",
readonly=True,
store=True,
)
company_currency_id = fields.Many2one(
"res.currency",
related="budget_id.company_id.currency_id",
related="account_id.company_id.currency_id",
string="Company Currency",
help="Utility field to express amount currency",
store=True,
Expand All @@ -40,7 +41,6 @@ class MisBudgetByAccountItem(models.Model):
comodel_name="account.account",
string="Account",
required=True,
# TODO domain (company_id)
)

_sql_constraints = [
Expand Down

0 comments on commit 15e740a

Please sign in to comment.