mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-03 23:52:24 +01:00
Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/core/lib/security.lib.php htdocs/filefunc.inc.php
This commit is contained in:
@@ -290,8 +290,9 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f
|
||||
if (!$user->rights->banque->cheque) { $createok = 0; $nbko++; }
|
||||
} elseif ($feature == 'import') {
|
||||
if (!$user->rights->import->run) { $createok = 0; $nbko++; }
|
||||
}
|
||||
elseif (!empty($feature2)) { // This is for permissions on one level
|
||||
} elseif ($feature == 'ecm') {
|
||||
if (!$user->rights->ecm->upload) { $createok = 0; $nbko++; }
|
||||
} elseif (!empty($feature2)) { // This is for permissions on one level
|
||||
foreach ($feature2 as $subfeature) {
|
||||
if ($subfeature == 'user' && $user->id == $objectid && $user->rights->user->self->creer) continue; // User can edit its own card
|
||||
if ($subfeature == 'user' && $user->id == $objectid && $user->rights->user->self->password) continue; // User can edit its own password
|
||||
|
||||
@@ -102,9 +102,7 @@ class modAsset extends DolibarrModules
|
||||
// Example: $this->const=array(0=>array('ASSETS_MYNEWCONST1','chaine','myvalue','This is a constant to add',1),
|
||||
// 1=>array('ASSETS_MYNEWCONST2','chaine','myvalue','This is another constant to add',0, 'current', 1)
|
||||
// );
|
||||
$this->const = array(
|
||||
//1=>array('ASSET_MYCONSTANT', 'chaine', 'avalue', 'This is a constant to add', 1, 'allentities', 1)
|
||||
);
|
||||
$this->const = array();
|
||||
|
||||
|
||||
if (!isset($conf->asset) || !isset($conf->asset->enabled))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -97,21 +97,21 @@ class modECM extends DolibarrModules
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 2501;
|
||||
$this->rights[$r][1] = 'Consulter/Télécharger les documents';
|
||||
$this->rights[$r][1] = 'Read or download documents';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'read';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 2503;
|
||||
$this->rights[$r][1] = 'Soumettre ou supprimer des documents';
|
||||
$this->rights[$r][1] = 'Upload a document';
|
||||
$this->rights[$r][2] = 'w';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'upload';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 2515;
|
||||
$this->rights[$r][1] = 'Administrer les rubriques de documents';
|
||||
$this->rights[$r][1] = 'Administer directories of documents';
|
||||
$this->rights[$r][2] = 'w';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'setup';
|
||||
|
||||
@@ -66,6 +66,16 @@ ALTER TABLE llx_facturedet_rec_extrafields ADD INDEX idx_facturedet_rec_extrafie
|
||||
|
||||
ALTER TABLE llx_facture_rec MODIFY COLUMN titre varchar(200) NOT NULL;
|
||||
|
||||
create table llx_mrp_mo_extrafields
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
tms timestamp,
|
||||
fk_object integer NOT NULL,
|
||||
import_key varchar(14) -- import key
|
||||
) ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_mrp_mo_extrafields ADD INDEX idx_fk_object(fk_object);
|
||||
|
||||
-- This var is per entity now, so we remove const if global if exists
|
||||
delete from llx_const where name in ('PROJECT_HIDE_TASKS', 'MAIN_BUGTRACK_ENABLELINK', 'MAIN_HELP_DISABLELINK') and entity = 0;
|
||||
|
||||
|
||||
@@ -93,8 +93,8 @@ CreditDate=Credit on
|
||||
WithdrawalFileNotCapable=Unable to generate withdrawal receipt file for your country %s (Your country is not supported)
|
||||
ShowWithdraw=Show Direct Debit Order
|
||||
IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one direct debit payment order not yet processed, it won't be set as paid to allow prior withdrawal management.
|
||||
DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to manage the direct debit payment order. When payment order is closed, payment on invoice will be automatically recorded, and invoice closed if remainder to pay is null.
|
||||
DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to manage the credit transfer payment order. When payment order is closed, payment on invoice will be automatically recorded, and invoice closed if remainder to pay is null.
|
||||
DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null.
|
||||
DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null.
|
||||
WithdrawalFile=Withdrawal file
|
||||
SetToStatusSent=Set to status "File Sent"
|
||||
ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null
|
||||
|
||||
@@ -150,20 +150,17 @@ if ($dirins && $action == 'initmodule' && $modulename)
|
||||
|
||||
dol_delete_file($destdir.'/sql/data.sql');
|
||||
dol_delete_file($destdir.'/sql/update_x.x.x-y.y.y.sql');
|
||||
dol_delete_dir($destdir.'/sql');
|
||||
|
||||
dol_delete_file($destdir.'/class/actions_'.strtolower($modulename).'.class.php');
|
||||
dol_delete_file($destdir.'/class/api_'.strtolower($modulename).'.class.php');
|
||||
dol_delete_dir($destdir.'/class');
|
||||
|
||||
dol_delete_file($destdir.'/css/'.strtolower($modulename).'.css.php');
|
||||
dol_delete_dir($destdir.'/css');
|
||||
|
||||
dol_delete_file($destdir.'/js/'.strtolower($modulename).'.js.php');
|
||||
dol_delete_dir($destdir.'/js');
|
||||
|
||||
dol_delete_file($destdir.'/scripts/'.strtolower($modulename).'.php');
|
||||
dol_delete_dir($destdir.'/scripts');
|
||||
|
||||
dol_delete_file($destdir.'/test/phpunit/MyModuleFunctionnalTest.php');
|
||||
|
||||
// Delete some files related to Object (because the previous dolCopyDir has copied everything)
|
||||
dol_delete_file($destdir.'/myobject_card.php');
|
||||
@@ -172,18 +169,21 @@ if ($dirins && $action == 'initmodule' && $modulename)
|
||||
dol_delete_file($destdir.'/myobject_agenda.php');
|
||||
dol_delete_file($destdir.'/myobject_list.php');
|
||||
dol_delete_file($destdir.'/lib/'.strtolower($modulename).'_myobject.lib.php');
|
||||
dol_delete_file($destdir.'/test/phpunit/MyModuleFunctionnalTest.php');
|
||||
dol_delete_file($destdir.'/test/phpunit/MyObjectTest.php');
|
||||
dol_delete_file($destdir.'/test/phpunit');
|
||||
dol_delete_file($destdir.'/test');
|
||||
dol_delete_file($destdir.'/sql/llx_'.strtolower($modulename).'_myobject.sql');
|
||||
dol_delete_file($destdir.'/sql/llx_'.strtolower($modulename).'_myobject_extrafields.sql');
|
||||
dol_delete_file($destdir.'/sql/llx_'.strtolower($modulename).'_myobject.key.sql');
|
||||
dol_delete_file($destdir.'/sql/llx_'.strtolower($modulename).'_myobject_extrafields.key.sql');
|
||||
dol_delete_file($destdir.'/img/object_myobject.png');
|
||||
dol_delete_file($destdir.'/class/myobject.class.php');
|
||||
dol_delete_dir($destdir.'/class');
|
||||
dol_delete_dir($destdir.'/sql');
|
||||
|
||||
dol_delete_dir($destdir.'/class', 1);
|
||||
dol_delete_dir($destdir.'/sql', 1);
|
||||
dol_delete_dir($destdir.'/scripts', 1);
|
||||
dol_delete_dir($destdir.'/js', 1);
|
||||
dol_delete_dir($destdir.'/css', 1);
|
||||
dol_delete_dir($destdir.'/test/phpunit', 1);
|
||||
dol_delete_dir($destdir.'/test', 1);
|
||||
}
|
||||
|
||||
// Edit PHP files
|
||||
|
||||
@@ -136,9 +136,7 @@ class modMyModule extends DolibarrModules
|
||||
// Example: $this->const=array(1 => array('MYMODULE_MYNEWCONST1', 'chaine', 'myvalue', 'This is a constant to add', 1),
|
||||
// 2 => array('MYMODULE_MYNEWCONST2', 'chaine', 'myvalue', 'This is another constant to add', 0, 'current', 1)
|
||||
// );
|
||||
$this->const = array(
|
||||
// 1 => array('MYMODULE_MYCONSTANT', 'chaine', 'avalue', 'This is a constant to add', 1, 'allentities', 1)
|
||||
);
|
||||
$this->const = array();
|
||||
|
||||
// Some keys to add into the overwriting translation tables
|
||||
/*$this->overwrite_translation = array(
|
||||
@@ -334,7 +332,7 @@ class modMyModule extends DolibarrModules
|
||||
$this->export_label[$r]='MyObjectLines'; // Translation key (used only if key ExportDataset_xxx_z not found)
|
||||
$this->export_icon[$r]='myobject@mymodule';
|
||||
// Define $this->export_fields_array, $this->export_TypeFields_array and $this->export_entities_array
|
||||
$keyforclass = 'MyObject'; $keyforclassfile='/mymobule/class/myobject.class.php'; $keyforelement='myobject@mymodule';
|
||||
$keyforclass = 'MyObject'; $keyforclassfile='/mymodule/class/myobject.class.php'; $keyforelement='myobject@mymodule';
|
||||
include DOL_DOCUMENT_ROOT.'/core/commonfieldsinexport.inc.php';
|
||||
//$this->export_fields_array[$r]['t.fieldtoadd']='FieldToAdd'; $this->export_TypeFields_array[$r]['t.fieldtoadd']='Text';
|
||||
//unset($this->export_fields_array[$r]['t.fieldtoremove']);
|
||||
@@ -364,7 +362,7 @@ class modMyModule extends DolibarrModules
|
||||
$this->export_code[$r]=$this->rights_class.'_'.$r;
|
||||
$this->export_label[$r]='MyObjectLines'; // Translation key (used only if key ExportDataset_xxx_z not found)
|
||||
$this->export_icon[$r]='myobject@mymodule';
|
||||
$keyforclass = 'MyObject'; $keyforclassfile='/mymobule/class/myobject.class.php'; $keyforelement='myobject@mymodule';
|
||||
$keyforclass = 'MyObject'; $keyforclassfile='/mymodule/class/myobject.class.php'; $keyforelement='myobject@mymodule';
|
||||
include DOL_DOCUMENT_ROOT.'/core/commonfieldsinexport.inc.php';
|
||||
$keyforselect='myobject'; $keyforaliasextra='extra'; $keyforelement='myobject@mymodule';
|
||||
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
|
||||
|
||||
@@ -869,7 +869,7 @@ $menus[$r++] = array('title'=>'<span class="fa fa-percent paddingrightonly"></sp
|
||||
$menus[$r++] = array('title'=>'<span class="far fa-money-bill-alt paddingrightonly"></span><div class="trunc">'.$langs->trans("Payment").'</div>', 'action'=>'CloseBill();');
|
||||
|
||||
if ($conf->global->TAKEPOS_DIRECT_PAYMENT) {
|
||||
$menus[$r++] = array('title'=>'<span class="far fa-money-bill-alt paddingrightonly"></span><div class="trunc">'.$langs->trans("DirectPayment").'</div>', 'action'=>'DirectPayment();');
|
||||
$menus[$r++] = array('title'=>'<span class="far fa-money-bill-alt paddingrightonly"></span><div class="trunc">'.$langs->trans("DirectPayment").' <span class="opacitymedium">('.$langs->trans("Cash").')</span></div>', 'action'=>'DirectPayment();');
|
||||
}
|
||||
|
||||
// BAR RESTAURANT specific menu
|
||||
|
||||
Reference in New Issue
Block a user