Merge pull request #23690 from Hystepik/develop#2
New : Export for module ticket
This commit is contained in:
commit
57f700d674
@ -208,6 +208,13 @@ class modTicket extends DolibarrModules
|
|||||||
$this->rights[$r][3] = 0; // La permission est-elle une permission par defaut
|
$this->rights[$r][3] = 0; // La permission est-elle une permission par defaut
|
||||||
$this->rights[$r][4] = 'manage';
|
$this->rights[$r][4] = 'manage';
|
||||||
|
|
||||||
|
$r++;
|
||||||
|
$this->rights[$r][0] = 56006; // id de la permission
|
||||||
|
$this->rights[$r][1] = "Export ticket"; // libelle de la permission
|
||||||
|
//$this->rights[$r][2] = 'd'; // type de la permission (deprecie a ce jour)
|
||||||
|
$this->rights[$r][3] = 0; // La permission est-elle une permission par defaut
|
||||||
|
$this->rights[$r][4] = 'export';
|
||||||
|
|
||||||
/* Seems not used and in conflict with societe->client->voir (see all thirdparties)
|
/* Seems not used and in conflict with societe->client->voir (see all thirdparties)
|
||||||
$r++;
|
$r++;
|
||||||
$this->rights[$r][0] = 56005; // id de la permission
|
$this->rights[$r][0] = 56005; // id de la permission
|
||||||
@ -318,6 +325,27 @@ class modTicket extends DolibarrModules
|
|||||||
'target' => '',
|
'target' => '',
|
||||||
'user' => 0);
|
'user' => 0);
|
||||||
$r++;
|
$r++;
|
||||||
|
|
||||||
|
// Exports
|
||||||
|
//--------
|
||||||
|
$r = 1;
|
||||||
|
|
||||||
|
// Export list of tickets and attributes
|
||||||
|
$langs->load("ticket");
|
||||||
|
$this->export_code[$r]=$this->rights_class.'_'.$r;
|
||||||
|
$this->export_label[$r]='ExportDataset_ticket_1'; // Translation key (used only if key ExportDataset_xxx_z not found)
|
||||||
|
$this->export_permission[$r] = array(array("ticket", "export"));
|
||||||
|
$this->export_icon[$r]='ticket';
|
||||||
|
$keyforclass = 'Ticket';$keyforclassfile='/ticket/class/ticket.class.php';$keyforelement='ticket';
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/commonfieldsinexport.inc.php';
|
||||||
|
$keyforselect='ticket'; $keyforaliasextra='extra'; $keyforelement='ticket';
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
|
||||||
|
$this->export_sql_start[$r]='SELECT DISTINCT ';
|
||||||
|
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'ticket as t';
|
||||||
|
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'ticket_extrafields as extra on (t.rowid = extra.fk_object)';
|
||||||
|
$this->export_sql_end[$r] .=' WHERE 1 = 1';
|
||||||
|
$this->export_sql_end[$r] .=' AND t.entity IN ('.getEntity('ticket').')';
|
||||||
|
$r++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -26,6 +26,7 @@ Permission56002=Modify tickets
|
|||||||
Permission56003=Delete tickets
|
Permission56003=Delete tickets
|
||||||
Permission56004=Manage tickets
|
Permission56004=Manage tickets
|
||||||
Permission56005=See tickets of all third parties (not effective for external users, always be limited to the third party they depend on)
|
Permission56005=See tickets of all third parties (not effective for external users, always be limited to the third party they depend on)
|
||||||
|
Permission56006=Export tickets
|
||||||
|
|
||||||
Tickets=Tickets
|
Tickets=Tickets
|
||||||
TicketDictType=Ticket - Types
|
TicketDictType=Ticket - Types
|
||||||
@ -61,6 +62,8 @@ TypeContact_ticket_external_CONTRIBUTOR=External contributor
|
|||||||
OriginEmail=Reporter Email
|
OriginEmail=Reporter Email
|
||||||
Notify_TICKET_SENTBYMAIL=Send ticket message by email
|
Notify_TICKET_SENTBYMAIL=Send ticket message by email
|
||||||
|
|
||||||
|
ExportDataset_ticket_1=Tickets
|
||||||
|
|
||||||
# Status
|
# Status
|
||||||
Read=Read
|
Read=Read
|
||||||
Assigned=Assigned
|
Assigned=Assigned
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user