Bug #1369: Fix problem when a template defines a calendar in new project pop-up
Use the calendar from the combo as they are already properly loaded. FEA: ItEr76S04BugFixing
This commit is contained in:
parent
760a61d3f1
commit
db9a8a5510
1 changed files with 11 additions and 1 deletions
|
|
@ -292,7 +292,17 @@ public class ProjectDetailsController extends GenericForwardComposer {
|
|||
.setTooltiptext(_("Code has to be autogenerated to create a new project from templates"));
|
||||
generateCode.setChecked(true);
|
||||
calculateProjectDates(template);
|
||||
setBaseCalendar(template.getCalendar());
|
||||
setCalendarFromTemplate(template);
|
||||
}
|
||||
}
|
||||
|
||||
private void setCalendarFromTemplate(OrderTemplate template) {
|
||||
BaseCalendar calendar = template.getCalendar();
|
||||
for (BaseCalendar each : getBaseCalendars()) {
|
||||
if (calendar.getId().equals(each.getId())) {
|
||||
setBaseCalendar(each);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue