Skip to content

Commit

Permalink
Merge PR #589 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by sbidoul
  • Loading branch information
OCA-git-bot committed Oct 1, 2024
2 parents 6cf6a7a + 65e3608 commit 0d187f7
Show file tree
Hide file tree
Showing 2 changed files with 3 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"
)
5 changes: 2 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 @@ -22,13 +22,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",
readonly=True,
help="Utility field to express amount currency",
Expand All @@ -38,7 +38,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 0d187f7

Please sign in to comment.