Fix #yogosha22395

This commit is contained in:
Laurent Destailleur
2024-06-02 22:43:54 +02:00
parent 8d85a725a2
commit ef3f007f51
4 changed files with 18 additions and 17 deletions

View File

@@ -113,21 +113,21 @@ class modReception extends DolibarrModules
$r++; $r++;
$this->rights[$r][0] = $this->numero.$r; $this->rights[$r][0] = $this->numero.$r;
$this->rights[$r][1] = 'Lire les receptions'; $this->rights[$r][1] = 'Read receptions';
$this->rights[$r][2] = 'r'; $this->rights[$r][2] = 'r';
$this->rights[$r][3] = 0; $this->rights[$r][3] = 0;
$this->rights[$r][4] = 'lire'; $this->rights[$r][4] = 'lire';
$r++; $r++;
$this->rights[$r][0] = $this->numero.$r; $this->rights[$r][0] = $this->numero.$r;
$this->rights[$r][1] = 'Creer modifier les receptions'; $this->rights[$r][1] = 'Create receptions';
$this->rights[$r][2] = 'w'; $this->rights[$r][2] = 'w';
$this->rights[$r][3] = 0; $this->rights[$r][3] = 0;
$this->rights[$r][4] = 'creer'; $this->rights[$r][4] = 'creer';
$r++; $r++;
$this->rights[$r][0] = $this->numero.$r; $this->rights[$r][0] = $this->numero.$r;
$this->rights[$r][1] = 'Valider les receptions'; $this->rights[$r][1] = 'Validate receptions';
$this->rights[$r][2] = 'd'; $this->rights[$r][2] = 'd';
$this->rights[$r][3] = 0; $this->rights[$r][3] = 0;
$this->rights[$r][4] = 'reception_advance'; $this->rights[$r][4] = 'reception_advance';
@@ -135,7 +135,7 @@ class modReception extends DolibarrModules
$r++; $r++;
$this->rights[$r][0] = $this->numero.$r; // id de la permission $this->rights[$r][0] = $this->numero.$r; // id de la permission
$this->rights[$r][1] = 'Envoyer les receptions aux clients'; // libelle de la permission $this->rights[$r][1] = 'Send receptions to customers'; // libelle de la permission
$this->rights[$r][2] = 'd'; // type de la permission (deprecated) $this->rights[$r][2] = 'd'; // type de la permission (deprecated)
$this->rights[$r][3] = 0; // La permission est-elle une permission par default $this->rights[$r][3] = 0; // La permission est-elle une permission par default
$this->rights[$r][4] = 'reception_advance'; $this->rights[$r][4] = 'reception_advance';
@@ -143,7 +143,7 @@ class modReception extends DolibarrModules
$r++; $r++;
$this->rights[$r][0] = $this->numero.$r; $this->rights[$r][0] = $this->numero.$r;
$this->rights[$r][1] = 'Exporter les receptions'; $this->rights[$r][1] = 'Export receptions';
$this->rights[$r][2] = 'r'; $this->rights[$r][2] = 'r';
$this->rights[$r][3] = 0; $this->rights[$r][3] = 0;
$this->rights[$r][4] = 'reception'; $this->rights[$r][4] = 'reception';
@@ -151,7 +151,7 @@ class modReception extends DolibarrModules
$r++; $r++;
$this->rights[$r][0] = $this->numero.$r; $this->rights[$r][0] = $this->numero.$r;
$this->rights[$r][1] = 'Supprimer les receptions'; $this->rights[$r][1] = 'Delete receptions';
$this->rights[$r][2] = 'd'; $this->rights[$r][2] = 'd';
$this->rights[$r][3] = 0; $this->rights[$r][3] = 0;
$this->rights[$r][4] = 'supprimer'; $this->rights[$r][4] = 'supprimer';

View File

@@ -1068,12 +1068,12 @@ Permission67001=Allow printing of receipts
Permission68001=Read intracomm report Permission68001=Read intracomm report
Permission68002=Create/modify intracomm report Permission68002=Create/modify intracomm report
Permission68004=Delete intracomm report Permission68004=Delete intracomm report
Permission941601=Read receipts Permission941601=Read receptions
Permission941602=Create and modify receipts Permission941602=Create and modify receptions
Permission941603=Validate receipts Permission941603=Validate receptions
Permission941604=Send receipts by email Permission941604=Send receptions by email
Permission941605=Export receipts Permission941605=Export receptions
Permission941606=Delete receipts Permission941606=Delete receptions
DictionaryCompanyType=Third-party types DictionaryCompanyType=Third-party types
DictionaryCompanyJuridicalType=Third-party legal entities DictionaryCompanyJuridicalType=Third-party legal entities
DictionaryProspectLevel=Prospect potential level for companies DictionaryProspectLevel=Prospect potential level for companies

View File

@@ -535,6 +535,7 @@ ToLocation=to
at=at at=at
and=and and=and
or=or or=or
otherwise=otherwise
Other=Other Other=Other
Others=Others Others=Others
OtherInformations=Other information OtherInformations=Other information

View File

@@ -508,12 +508,12 @@ if (empty($reshook)) {
if ($result < 0) { if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors'); setEventMessages($object->error, $object->errors, 'errors');
} }
} elseif ($action == 'settracking_number' || $action == 'settracking_url' } elseif (($action == 'settracking_number' || $action == 'settracking_url'
|| $action == 'settrueWeight' || $action == 'settrueWeight'
|| $action == 'settrueWidth' || $action == 'settrueWidth'
|| $action == 'settrueHeight' || $action == 'settrueHeight'
|| $action == 'settrueDepth' || $action == 'settrueDepth'
|| $action == 'setshipping_method_id') { || $action == 'setshipping_method_id') && $permissiontoadd) {
// Action update // Action update
$error = 0; $error = 0;
@@ -588,7 +588,7 @@ if (empty($reshook)) {
} else { } else {
setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors'); setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors');
} }
} elseif ($action == 'classifybilled') { } elseif ($action == 'classifybilled' && $permissiontoadd) {
$result = $object->setBilled(); $result = $object->setBilled();
if ($result >= 0) { if ($result >= 0) {
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
@@ -1516,7 +1516,7 @@ if ($action == 'create') {
print $langs->trans('DateDeliveryPlanned'); print $langs->trans('DateDeliveryPlanned');
print '</td>'; print '</td>';
if ($action != 'editdate_livraison') { if ($action != 'editdate_livraison' && $permissiontoadd) {
print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editdate_livraison&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetDeliveryDate'), 1).'</a></td>'; print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editdate_livraison&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetDeliveryDate'), 1).'</a></td>';
} }
print '</tr></table>'; print '</tr></table>';
@@ -1648,7 +1648,7 @@ if ($action == 'create') {
print $langs->trans('ReceptionMethod'); print $langs->trans('ReceptionMethod');
print '</td>'; print '</td>';
if ($action != 'editshipping_method_id') { if ($action != 'editshipping_method_id' && $permissiontoadd) {
print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editshipping_method_id&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetReceptionMethod'), 1).'</a></td>'; print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editshipping_method_id&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetReceptionMethod'), 1).'</a></td>';
} }
print '</tr></table>'; print '</tr></table>';