temporary branch
This commit is contained in:
@@ -17,7 +17,10 @@
|
||||
*/
|
||||
package com.axelor.apps.crm.web;
|
||||
|
||||
import com.axelor.apps.ReportFactory;
|
||||
import com.axelor.apps.base.report.IReport;
|
||||
import com.axelor.apps.base.service.MapService;
|
||||
import com.axelor.apps.base.service.app.AppBaseService;
|
||||
import com.axelor.apps.crm.db.Event;
|
||||
import com.axelor.apps.crm.db.EventReminder;
|
||||
import com.axelor.apps.crm.db.Lead;
|
||||
@@ -33,6 +36,7 @@ import com.axelor.apps.crm.service.LeadService;
|
||||
import com.axelor.apps.message.db.EmailAddress;
|
||||
import com.axelor.apps.purchase.db.ImportationFolder;
|
||||
import com.axelor.apps.purchase.db.repo.ImportationFolderRepository;
|
||||
import com.axelor.apps.report.engine.ReportSettings;
|
||||
import com.axelor.apps.tool.date.DateTool;
|
||||
import com.axelor.apps.tool.date.DurationTool;
|
||||
import com.axelor.auth.AuthUtils;
|
||||
@@ -43,6 +47,7 @@ import com.axelor.exception.db.repo.TraceBackRepository;
|
||||
import com.axelor.exception.service.TraceBackService;
|
||||
import com.axelor.i18n.I18n;
|
||||
import com.axelor.inject.Beans;
|
||||
import com.axelor.meta.schema.actions.ActionView;
|
||||
import com.axelor.rpc.ActionRequest;
|
||||
import com.axelor.rpc.ActionResponse;
|
||||
import com.google.common.base.Joiner;
|
||||
@@ -566,4 +571,37 @@ public class EventController {
|
||||
response.setReload(true);
|
||||
}
|
||||
|
||||
|
||||
public void openRoqApplication(ActionRequest request, ActionResponse response) {
|
||||
|
||||
|
||||
String uri = Beans.get(AppBaseService.class).getAppBase().getRoqURL();
|
||||
|
||||
LOG.debug("link {}",uri+AuthUtils.getUser().getId());
|
||||
|
||||
response.setView(
|
||||
ActionView.define(I18n.get("ROQ"))
|
||||
.model("")
|
||||
.add("html", uri +AuthUtils.getUser().getId())
|
||||
.map());
|
||||
}
|
||||
|
||||
|
||||
public void printMeeting(ActionRequest request, ActionResponse response) throws AxelorException {
|
||||
Event event = request.getContext().asType(Event.class);
|
||||
event = Beans.get(EventRepository.class).find(event.getId());
|
||||
|
||||
String eventName = I18n.get("Event");
|
||||
|
||||
String fileLink =
|
||||
ReportFactory.createReport(IReport.MEETING, event.getSubject() + "-${date}")
|
||||
.addParam("Locale", ReportSettings.getPrintingLocale())
|
||||
.addParam("meetingId", event.getId())
|
||||
.generate()
|
||||
.getFileLink();
|
||||
|
||||
|
||||
response.setView(ActionView.define(eventName).add("html", fileLink).map());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<domain-models xmlns="http://axelor.com/xml/ns/domain-models"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://axelor.com/xml/ns/domain-models http://axelor.com/xml/ns/domain-models/domain-models_5.2.xsd">
|
||||
|
||||
<module name="crm" package="com.axelor.apps.crm.db"/>
|
||||
|
||||
<entity name="ActionEvent" lang="java" extends="com.axelor.apps.base.db.ICalendarEvent">
|
||||
|
||||
<!-- Commun -->
|
||||
<datetime name="limitDateT" title="Limit Date"/>
|
||||
|
||||
<long name="duration" title="Duration"/>
|
||||
|
||||
<many-to-one name="eventCategory" ref="com.axelor.apps.crm.db.EventCategory" title="Category"/>
|
||||
|
||||
<string name="relatedToSelect" title="Related to" selection="crm.event.related.to.select"/>
|
||||
<long name="relatedToSelectId"/>
|
||||
<integer name="statusSelect" title="Status" selection="crm.event.status.select"/>
|
||||
|
||||
<many-to-one name="team" ref="com.axelor.team.db.Team" title="Team"/>
|
||||
|
||||
<string name="calendarEventUid" title="UID (Calendar)"/>
|
||||
|
||||
<!-- Call -->
|
||||
<integer name="callTypeSelect" title="Call type" selection="crm.event.call.type.select"/>
|
||||
<many-to-many name="guestList" ref="com.axelor.auth.db.User" title="Guest"/>
|
||||
|
||||
<!-- Task -->
|
||||
<boolean name="isRecurrent" title="Recurrent"/>
|
||||
<many-to-one name="parentEvent" ref="com.axelor.apps.crm.db.Event"/>
|
||||
|
||||
<integer name="prioritySelect" title="Priority" selection="crm.event.priority.select" default="2"/>
|
||||
<!-- roq flags -->
|
||||
<integer name="flag" title="Flag" selection="crm.event.flag.select"/>
|
||||
|
||||
|
||||
<string name="uid" column="calendar_uid" unique="true" hashKey="false" title="UID"/>
|
||||
<string name="url" title="URL"/>
|
||||
<string name="subject" required="true" namecolumn="true" title="Subject"/>
|
||||
<string name="description" title="Description" large="true"/>
|
||||
<string name="status" title="Status"/>
|
||||
<datetime name="startDateTime" required="true" title="Start date"/>
|
||||
<datetime name="endDateTime" required="true" title="End date"/>
|
||||
<boolean name="allDay" title="All day"/>
|
||||
<string name="location" title="Location"/>
|
||||
<string name="geo" title="Geo. coordinates"/>
|
||||
|
||||
<many-to-one name="organizer" ref="com.axelor.apps.base.db.ICalendarUser" title="Organizer"/>
|
||||
<one-to-many name="attendees" ref="com.axelor.apps.base.db.ICalendarUser" title="Attendees" mappedBy="event" orphanRemoval="false"/>
|
||||
|
||||
<integer name="visibilitySelect" title="Visibility" selection="i.cal.event.visibility.select" default="1"/>
|
||||
<integer name="disponibilitySelect" title="Availability" selection="i.cal.event.disponibility.select" default="1"/>
|
||||
<string name="subjectTeam"/>
|
||||
<integer name="typeSelect" title="Type" selection="icalendar.event.type.select" required="true" />
|
||||
<many-to-one name="user" column="user_id" ref="com.axelor.auth.db.User" title="Assigned to"/>
|
||||
<finder-method name="findByUid" using="uid" />
|
||||
</entity>
|
||||
</domain-models>
|
||||
@@ -31,6 +31,10 @@
|
||||
<!-- Call -->
|
||||
<integer name="callTypeSelect" title="Call type" selection="crm.event.call.type.select"/>
|
||||
|
||||
<many-to-many name="guestList" ref="com.axelor.auth.db.User" title="Guest"/>
|
||||
|
||||
<many-to-many name="presentGuestList" ref="com.axelor.auth.db.User" title="Present guests"/>
|
||||
|
||||
<!-- Task -->
|
||||
<boolean name="isRecurrent" title="Recurrent"/>
|
||||
<many-to-one name="parentEvent" ref="com.axelor.apps.crm.db.Event"/>
|
||||
@@ -39,6 +43,9 @@
|
||||
selection="crm.event.priority.select" default="2"/>
|
||||
|
||||
<many-to-one name="recurrenceConfiguration" ref="com.axelor.apps.crm.db.RecurrenceConfiguration"/>
|
||||
|
||||
<many-to-many ref="com.axelor.apps.base.db.CompanyDepartment" name="departmentList" />
|
||||
<many-to-one ref="com.axelor.apps.base.db.CompanyDepartment" name="departmentEmitter" />
|
||||
|
||||
<extra-code>
|
||||
<![CDATA[
|
||||
|
||||
Reference in New Issue
Block a user