First commit waiting for Budget Alert

This commit is contained in:
2025-09-04 13:37:35 +01:00
commit 2d681f27f5
4563 changed files with 1061534 additions and 0 deletions

View File

@ -0,0 +1,19 @@
apply plugin: "com.axelor.app-module"
apply from: "../version.gradle"
apply {
version = openSuiteVersion
}
axelor {
title "Axelor :: Mobile"
description "Axelor Mobile Module"
}
dependencies {
compile project(":modules:axelor-sale")
compile project(":modules:axelor-human-resource")
}

View File

@ -0,0 +1,82 @@
/*
* Axelor Business Solutions
*
* Copyright (C) 2019 Axelor (<http://axelor.com>).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.axelor.apps.mobile.web;
import com.axelor.apps.base.db.AppMobile;
import com.axelor.apps.base.service.app.AppService;
import com.axelor.auth.db.AuditableModel;
import com.axelor.inject.Beans;
import com.axelor.rpc.ActionRequest;
import com.axelor.rpc.ActionResponse;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
public class AppMobileController {
public void getAppMobile(ActionRequest request, ActionResponse response) {
Map<String, Object> data = new HashMap<>();
AppService appService = Beans.get(AppService.class);
AppMobile appMobile = (AppMobile) appService.getApp("mobile");
data.put("isAppMobileEnable", appMobile.getActive());
data.put("isSaleAppEnable", appService.isApp("sale") ? appMobile.getIsSaleAppEnable() : false);
data.put("isCrmAppEnable", appService.isApp("crm") ? appMobile.getIsCrmAppEnable() : false);
data.put(
"isTimesheetAppEnable",
appService.isApp("timesheet") ? appMobile.getIsTimesheetAppEnable() : false);
data.put(
"isLeaveAppEnable", appService.isApp("leave") ? appMobile.getIsLeaveAppEnable() : false);
data.put(
"isExpenseAppEnable",
appService.isApp("expense") ? appMobile.getIsExpenseAppEnable() : false);
data.put(
"isTaskAppEnable", appService.isApp("project") ? appMobile.getIsTaskAppEnable() : false);
data.put(
"isQualityAppEnable",
appService.isApp("quality") ? appMobile.getIsQualityAppEnable() : false);
data.put("offlineRecordLimit", appMobile.getOfflineRecordLimit());
data.put("partnerSet", convertToData(appMobile.getPartnerSet()));
data.put("partnerContactSet", convertToData(appMobile.getPartnerContactSet()));
data.put("projectSet", convertToData(appMobile.getProjectSet()));
data.put("leadSet", convertToData(appMobile.getLeadSet()));
data.put("productSet", convertToData(appMobile.getProductSet()));
response.setData(data);
}
private Object convertToData(Set<? extends AuditableModel> modelSet) {
return modelSet
.stream()
.map(
it ->
new HashMap<String, Object>() {
{
put("id", it.getId());
put("version", it.getVersion());
}
})
.collect(Collectors.toSet());
}
}

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<csv-inputs xmlns="http://axelor.com/xml/ns/data-import"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://axelor.com/xml/ns/data-import http://axelor.com/xml/ns/data-import/data-import_5.2.xsd">
<input file="base_appMobile.csv" separator=";" type="com.axelor.apps.base.db.AppMobile" call="com.axelor.csv.script.ImportApp:importApp">
<bind column="dependsOn" to="dependsOnSet" search="self.code in :dependsOn" eval="dependsOn.split(',') as List"/>
</input>
</csv-inputs>

View File

@ -0,0 +1,2 @@
"name";"code";"installOrder";"description";"imagePath";"modules";"dependsOn";"sequence"
"Axelor Mobile";"mobile";32;"Axelor Mobile Management";"app-mobile.png";"axelor-mobile";"sale,expense,leave,timesheet";110
1 name code installOrder description imagePath modules dependsOn sequence
2 Axelor Mobile mobile 32 Axelor Mobile Management app-mobile.png axelor-mobile sale,expense,leave,timesheet 110

Binary file not shown.

After

Width:  |  Height:  |  Size: 511 B

View File

@ -0,0 +1,35 @@
<?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="base" package="com.axelor.apps.base.db"/>
<entity name="AppMobile" lang="java" extends="App">
<boolean name="isSaleAppEnable" default="true" title="Sale"/>
<boolean name="isCrmAppEnable" default="true" title="CRM"/>
<boolean name="isTimesheetAppEnable" default="true" title="Timesheet"/>
<boolean name="isLeaveAppEnable" default="true" title="Leave"/>
<boolean name="isExpenseAppEnable" default="true" title="Expense"/>
<boolean name="isTaskAppEnable" default="true" title="Task"/>
<boolean name="isQualityAppEnable" default="true" title="Quality"/>
<decimal name="offlineRecordLimit" title="Offline record limit"/>
<many-to-many name="partnerSet" ref="com.axelor.apps.base.db.Partner" title="Customers"/>
<many-to-many name="partnerContactSet" ref="com.axelor.apps.base.db.Partner" title="Contacts"/>
<many-to-many name="projectSet" ref="com.axelor.apps.project.db.Project" title="Projects"/>
<many-to-many name="leadSet" ref="com.axelor.apps.crm.db.Lead" title="Leads"/>
<many-to-many name="productSet" ref="com.axelor.apps.base.db.Product" title="Products"/>
<track>
<field name="isSaleAppEnable" on="UPDATE"/>
<field name="isCrmAppEnable" on="UPDATE"/>
<field name="isTimesheetAppEnable" on="UPDATE"/>
<field name="isLeaveAppEnable" on="UPDATE"/>
<field name="isExpenseAppEnable" on="UPDATE"/>
<field name="offlineRecordLimit" on="UPDATE"/>
</track>
</entity>
</domain-models>

View File

@ -0,0 +1,18 @@
<?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="auth" package="com.axelor.auth.db"/>
<entity name="User" sequential="true" lang="java">
<string name="appPermissions" title="Mobile app permissions" selection="mobile.user.app.permissions.select"/>
<track>
<field name="appPermissions"/>
</track>
</entity>
</domain-models>

View File

@ -0,0 +1,21 @@
"key","message","comment","context"
"App Mobile",,,
"CRM",,,
"Contacts",,,
"Customers",,,
"Expense",,,
"Expenses",,,
"Leads",,,
"Leave",,,
"Leaves",,,
"Mobile app permissions",,,
"Mobile apps",,,
"Offline record limit",,,
"Products",,,
"Projects",,,
"Quality",,,
"Sale",,,
"Sales",,,
"Task",,,
"Timesheet",,,
"Timesheets",,,
1 key message comment context
2 App Mobile
3 CRM
4 Contacts
5 Customers
6 Expense
7 Expenses
8 Leads
9 Leave
10 Leaves
11 Mobile app permissions
12 Mobile apps
13 Offline record limit
14 Products
15 Projects
16 Quality
17 Sale
18 Sales
19 Task
20 Timesheet
21 Timesheets

View File

@ -0,0 +1,21 @@
"key","message","comment","context"
"App Mobile","App Mobile",,
"Apps permissions","Apps Berechtigungen",,
"CRM","CRM",,
"Contacts","Kontakte",,
"Customers","Kunden",,
"Expense","Aufwand",,
"Expenses","Aufwendungen",,
"Leads","Leads",,
"Leave","Urlaub",,
"Leaves","Blätter",,
"Mobile apps","Mobile Apps",,
"Offline record limit","Offline-Satzgrenze",,
"Products","Produkte",,
"Projects","Projekte",,
"Quality",,,
"Sale","Verkauf",,
"Sales","Umsatz",,
"Task",,,
"Timesheet","Stundenzettel",,
"Timesheets","Stundenzettel",,
1 key message comment context
2 App Mobile App Mobile
3 Apps permissions Apps Berechtigungen
4 CRM CRM
5 Contacts Kontakte
6 Customers Kunden
7 Expense Aufwand
8 Expenses Aufwendungen
9 Leads Leads
10 Leave Urlaub
11 Leaves Blätter
12 Mobile apps Mobile Apps
13 Offline record limit Offline-Satzgrenze
14 Products Produkte
15 Projects Projekte
16 Quality
17 Sale Verkauf
18 Sales Umsatz
19 Task
20 Timesheet Stundenzettel
21 Timesheets Stundenzettel

View File

@ -0,0 +1,21 @@
"key","message","comment","context"
"App Mobile",,,
"CRM",,,
"Contacts",,,
"Customers",,,
"Expense",,,
"Expenses",,,
"Leads",,,
"Leave",,,
"Leaves",,,
"Mobile app permissions",,,
"Mobile apps",,,
"Offline record limit",,,
"Products",,,
"Projects",,,
"Quality",,,
"Sale",,,
"Sales",,,
"Task",,,
"Timesheet",,,
"Timesheets",,,
1 key message comment context
2 App Mobile
3 CRM
4 Contacts
5 Customers
6 Expense
7 Expenses
8 Leads
9 Leave
10 Leaves
11 Mobile app permissions
12 Mobile apps
13 Offline record limit
14 Products
15 Projects
16 Quality
17 Sale
18 Sales
19 Task
20 Timesheet
21 Timesheets

View File

@ -0,0 +1,21 @@
"key","message","comment","context"
"App Mobile","Aplicación Móvil",,
"Apps permissions","Permisos de las aplicaciones",,
"CRM","CRM",,
"Contacts","Contactos",,
"Customers","Clientes",,
"Expense","Gasto",,
"Expenses","Gastos",,
"Leads","Plomos",,
"Leave","Salir",,
"Leaves","Hojas",,
"Mobile apps","Aplicaciones para móviles",,
"Offline record limit","Límite de registros fuera de línea",,
"Products","Productos",,
"Projects","Proyectos",,
"Quality",,,
"Sale","Venta",,
"Sales","Ventas",,
"Task",,,
"Timesheet","Hoja de horas",,
"Timesheets","Hojas horarias",,
1 key message comment context
2 App Mobile Aplicación Móvil
3 Apps permissions Permisos de las aplicaciones
4 CRM CRM
5 Contacts Contactos
6 Customers Clientes
7 Expense Gasto
8 Expenses Gastos
9 Leads Plomos
10 Leave Salir
11 Leaves Hojas
12 Mobile apps Aplicaciones para móviles
13 Offline record limit Límite de registros fuera de línea
14 Products Productos
15 Projects Proyectos
16 Quality
17 Sale Venta
18 Sales Ventas
19 Task
20 Timesheet Hoja de horas
21 Timesheets Hojas horarias

View File

@ -0,0 +1,21 @@
"key","message","comment","context"
"App Mobile",,,
"CRM",,,
"Contacts",,,
"Customers",,,
"Expense",,,
"Expenses",,,
"Leads",,,
"Leave",,,
"Leaves",,,
"Mobile app permissions","Permissions sur l'application mobile",,
"Mobile apps",,,
"Offline record limit",,,
"Products",,,
"Projects",,,
"Quality",,,
"Sale",,,
"Sales",,,
"Task",,,
"Timesheet",,,
"Timesheets",,,
1 key message comment context
2 App Mobile
3 CRM
4 Contacts
5 Customers
6 Expense
7 Expenses
8 Leads
9 Leave
10 Leaves
11 Mobile app permissions Permissions sur l'application mobile
12 Mobile apps
13 Offline record limit
14 Products
15 Projects
16 Quality
17 Sale
18 Sales
19 Task
20 Timesheet
21 Timesheets

View File

@ -0,0 +1,21 @@
"key","message","comment","context"
"App Mobile","App Mobile",,
"Apps permissions","Permessi per le applicazioni",,
"CRM","CRM",,
"Contacts","Contatti",,
"Customers","I clienti",,
"Expense","Spese",,
"Expenses","Spese",,
"Leads","Piombi",,
"Leave","Lascia",,
"Leaves","Foglie",,
"Mobile apps","Applicazioni mobili",,
"Offline record limit","Limite record offline",,
"Products","Prodotti",,
"Projects","Progetti",,
"Quality",,,
"Sale","Vendita",,
"Sales","Vendite",,
"Task",,,
"Timesheet","Foglio orario",,
"Timesheets","Schede orarie",,
1 key message comment context
2 App Mobile App Mobile
3 Apps permissions Permessi per le applicazioni
4 CRM CRM
5 Contacts Contatti
6 Customers I clienti
7 Expense Spese
8 Expenses Spese
9 Leads Piombi
10 Leave Lascia
11 Leaves Foglie
12 Mobile apps Applicazioni mobili
13 Offline record limit Limite record offline
14 Products Prodotti
15 Projects Progetti
16 Quality
17 Sale Vendita
18 Sales Vendite
19 Task
20 Timesheet Foglio orario
21 Timesheets Schede orarie

View File

@ -0,0 +1,21 @@
"key","message","comment","context"
"App Mobile","App Mobiel",,
"Apps permissions","Toestemmingen voor apps",,
"CRM","CRM",,
"Contacts","Contacten",,
"Customers","Klanten",,
"Expense","Uitgaven",,
"Expenses","Uitgaven",,
"Leads","Leads",,
"Leave","Verlof",,
"Leaves","Bladeren",,
"Mobile apps","Mobiele apps",,
"Offline record limit","Offline record limiet",,
"Products","Producten",,
"Projects","Projecten",,
"Quality",,,
"Sale","Verkoop",,
"Sales","Verkoop",,
"Task",,,
"Timesheet","Timesheet",,
"Timesheets","Timesheets",,
1 key message comment context
2 App Mobile App Mobiel
3 Apps permissions Toestemmingen voor apps
4 CRM CRM
5 Contacts Contacten
6 Customers Klanten
7 Expense Uitgaven
8 Expenses Uitgaven
9 Leads Leads
10 Leave Verlof
11 Leaves Bladeren
12 Mobile apps Mobiele apps
13 Offline record limit Offline record limiet
14 Products Producten
15 Projects Projecten
16 Quality
17 Sale Verkoop
18 Sales Verkoop
19 Task
20 Timesheet Timesheet
21 Timesheets Timesheets

View File

@ -0,0 +1,21 @@
"key","message","comment","context"
"App Mobile","Aplikacja Mobilna",,
"Apps permissions","Aplikuje zezwolenia",,
"CRM","CRM",,
"Contacts","Kontakty",,
"Customers","Klienci",,
"Expense","Wydatki",,
"Expenses","Wydatki",,
"Leads","Ołowiane",,
"Leave","Urlop",,
"Leaves","Liście",,
"Mobile apps","Aplikacje mobilne",,
"Offline record limit","Limit rekordu w trybie offline",,
"Products","Produkty",,
"Projects","Projekty",,
"Quality",,,
"Sale","Sprzedaż",,
"Sales","Sprzedaż",,
"Task",,,
"Timesheet","Arkusz czasu",,
"Timesheets","Arkusze czasu",,
1 key message comment context
2 App Mobile Aplikacja Mobilna
3 Apps permissions Aplikuje zezwolenia
4 CRM CRM
5 Contacts Kontakty
6 Customers Klienci
7 Expense Wydatki
8 Expenses Wydatki
9 Leads Ołowiane
10 Leave Urlop
11 Leaves Liście
12 Mobile apps Aplikacje mobilne
13 Offline record limit Limit rekordu w trybie offline
14 Products Produkty
15 Projects Projekty
16 Quality
17 Sale Sprzedaż
18 Sales Sprzedaż
19 Task
20 Timesheet Arkusz czasu
21 Timesheets Arkusze czasu

View File

@ -0,0 +1,21 @@
"key","message","comment","context"
"App Mobile","App Mobile",,
"Apps permissions","Permissões de aplicativos",,
"CRM","CRM",,
"Contacts","Contactos",,
"Customers","Clientes",,
"Expense","Despesas",,
"Expenses","Despesas",,
"Leads","Leads",,
"Leave","Deixar",,
"Leaves","Folhas",,
"Mobile apps","Aplicativos móveis",,
"Offline record limit","Limite de registro off-line",,
"Products","Produtos",,
"Projects","Projetos",,
"Quality",,,
"Sale","Venda",,
"Sales","Vendas",,
"Task",,,
"Timesheet","Folha de horas de trabalho",,
"Timesheets","Folhas de horas de trabalho",,
1 key message comment context
2 App Mobile App Mobile
3 Apps permissions Permissões de aplicativos
4 CRM CRM
5 Contacts Contactos
6 Customers Clientes
7 Expense Despesas
8 Expenses Despesas
9 Leads Leads
10 Leave Deixar
11 Leaves Folhas
12 Mobile apps Aplicativos móveis
13 Offline record limit Limite de registro off-line
14 Products Produtos
15 Projects Projetos
16 Quality
17 Sale Venda
18 Sales Vendas
19 Task
20 Timesheet Folha de horas de trabalho
21 Timesheets Folhas de horas de trabalho

View File

@ -0,0 +1,21 @@
"key","message","comment","context"
"App Mobile","App Mobile",,
"Apps permissions","Разрешения приложений",,
"CRM","CRM",,
"Contacts","Контакты",,
"Customers","Клиенты",,
"Expense","Расходы",,
"Expenses","Расходы",,
"Leads","Зацепки",,
"Leave","Оставь",,
"Leaves","Листья",,
"Mobile apps","Мобильные приложения",,
"Offline record limit","Оффлайн лимит записи",,
"Products","Продукты",,
"Projects","Проекты",,
"Quality",,,
"Sale","Продажа",,
"Sales","Продажи",,
"Task",,,
"Timesheet","Тайм-аут",,
"Timesheets","Тайм-аутбуки",,
1 key message comment context
2 App Mobile App Mobile
3 Apps permissions Разрешения приложений
4 CRM CRM
5 Contacts Контакты
6 Customers Клиенты
7 Expense Расходы
8 Expenses Расходы
9 Leads Зацепки
10 Leave Оставь
11 Leaves Листья
12 Mobile apps Мобильные приложения
13 Offline record limit Оффлайн лимит записи
14 Products Продукты
15 Projects Проекты
16 Quality
17 Sale Продажа
18 Sales Продажи
19 Task
20 Timesheet Тайм-аут
21 Timesheets Тайм-аутбуки

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<object-views xmlns="http://axelor.com/xml/ns/object-views"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://axelor.com/xml/ns/object-views http://axelor.com/xml/ns/object-views/object-views_5.2.xsd">
<form name="app-mobile-config-form" title="App Mobile" model="com.axelor.apps.base.db.AppMobile" canDelete="false" canNew="false" width="large">
<panel name="mobileAppsPanel" title="Mobile apps">
<field name="isSaleAppEnable" widget="boolean-switch" if="__config__.app.isApp('sale')"/>
<field name="isCrmAppEnable" widget="boolean-switch" if="__config__.app.isApp('crm')"/>
<field name="isTimesheetAppEnable" widget="boolean-switch" if="__config__.app.isApp('timesheet')"/>
<field name="isLeaveAppEnable" widget="boolean-switch" if="__config__.app.isApp('leave')"/>
<field name="isExpenseAppEnable" widget="boolean-switch" if="__config__.app.isApp('expense')"/>
<field name="isTaskAppEnable" widget="boolean-switch" if="__config__.app.isApp('project')"/>
<field name="isQualityAppEnable" widget="boolean-switch" if="__config__.app.isApp('quality')"/>
<field name="offlineRecordLimit"/>
</panel>
<panel-tabs name="mainPanelTab" showIf="isSaleAppEnable || isCrmAppEnable" >
<panel-related name="partnerSetPanel" field="partnerSet" domain="self.isCustomer = 'true' and self.isContact = 'false'" form-view="partner-form" grid-view="partner-grid"/>
<panel-related name="partnerContactSetPanel" field="partnerContactSet" domain="self.isContact = 'true'" form-view="partner-contact-form" grid-view="partner-contact-grid"/>
<panel-related name="projectSetPanel" field="projectSet" form-view="project-form" grid-view="project-grid"/>
<panel-related name="leadSetPanel" field="leadSet" showIf="isCrmAppEnable" form-view="lead-form" grid-view="lead-grid"/>
<panel-related name="productSetPanel" field="productSet" showIf="isSaleAppEnable" form-view="product-form" grid-view="product-grid"/>
</panel-tabs>
<panel-mail name="mailPanel">
<mail-messages limit="4" />
<mail-followers />
</panel-mail>
</form>
</object-views>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<object-views xmlns="http://axelor.com/xml/ns/object-views"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://axelor.com/xml/ns/object-views http://axelor.com/xml/ns/object-views/object-views_5.2.xsd">
<selection name="mobile.user.app.permissions.select">
<option value="crm">CRM</option>
<option value="sale">Sales</option>
<option value="timesheet">Timesheets</option>
<option value="expense">Expenses</option>
<option value="leave">Leaves</option>
<option value="task">Task</option>
<option value="quality">Quality</option>
</selection>
</object-views>