Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: OCA/timesheet
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 42e3a36e1679d296b1f780de294f8ccf2b211aa2
Choose a base ref
..
head repository: OCA/timesheet
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b26eddea2d20f10a188b669e97e67421994f5e6a
Choose a head ref
Showing with 9 additions and 10 deletions.
  1. +9 −10 hr_timesheet_sheet/models/account_analytic_account.py
19 changes: 9 additions & 10 deletions hr_timesheet_sheet/models/account_analytic_account.py
Original file line number Diff line number Diff line change
@@ -15,14 +15,13 @@ def _check_timesheet_sheet_company_id(self):
lambda s, rec=rec: s.company_id and s.company_id != rec.company_id
)
if sheets:
raise ValidationError(
_(
"You cannot change the company, "
"as this %(rec_name)s (%(rec_display_name)s) "
"is assigned to %(current_name)s (%(current_display_name)s).",
rec_name=rec._name,
rec_display_name=rec.display_name,
current_name=sheets[0]._name,
current_display_name=sheets[0].display_name,
)
err = _(
"You cannot change the company, "
"as this %(rec_name)s (%(rec_display_name)s) "
"is assigned to %(current_name)s (%(current_display_name)s).",
rec_name=rec._name,
rec_display_name=rec.display_name,
current_name=sheets[0]._name,
current_display_name=sheets[0].display_name,
)
raise ValidationError(err)