From abb346651e9ebc099845f41ee409cc50c1f02696 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jul 2017 21:27:07 +0200 Subject: [PATCH 1/2] Close #6807 --- htdocs/compta/facture/fiche-rec.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index d38ea012c3c..3a072f946be 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -1311,7 +1311,7 @@ else print ''; print '
'; print $langs->trans('RIB'); print ''; - if (($action != 'editbankaccount') && $user->rights->commande->creer && ! empty($object->brouillon)) + if (($action != 'editbankaccount') && $user->rights->facture->creer && ! empty($object->brouillon)) print 'id.'">'.img_edit($langs->trans('SetBankAccount'),1).'
'; print ''; From 04b6c30b6d3d95aa3a05be030b4857f1bd9a3989 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 26 Jul 2017 10:12:22 +0200 Subject: [PATCH 2/2] Code comment --- htdocs/cron/class/cronjob.class.php | 4 ++-- .../template/core/modules/modMyModule.class.php | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/cron/class/cronjob.class.php b/htdocs/cron/class/cronjob.class.php index f9b4ac67f03..d4d7f6d80c6 100644 --- a/htdocs/cron/class/cronjob.class.php +++ b/htdocs/cron/class/cronjob.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013 Florian Henry + * Copyright (C) 2013 Florian Henry * * 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 @@ -61,7 +61,7 @@ class Cronjob extends CommonObject public $fk_user_mod; public $nbrun; public $libname; - + public $test; // A test condition to know if job is visible/qualified /** * Constructor diff --git a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php index 6d9054af60b..3e217618d4a 100644 --- a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php +++ b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php @@ -186,12 +186,12 @@ class modMyModule extends DolibarrModules ); - // Cronjobs + // Cronjobs (List of cron jobs entries to add when module is enabled) $this->cronjobs = array( - 0=>array('label'=>'MyJob label', 'jobtype'=>'method', 'class'=>'/mymodule/class/mymodulemyjob.class.php', 'objectname'=>'MyModuleMyJob', 'method'=>'myMethod', 'parameters'=>'', 'comment'=>'Comment', 'frequency'=>2, 'unitfrequency'=>3600, 'test'=>true) - ); // List of cron jobs entries to add - // Example: $this->cronjobs=array(0=>array('label'=>'My label', 'jobtype'=>'method', 'class'=>'/dir/class/file.class.php', 'objectname'=>'MyClass', 'method'=>'myMethod', 'parameters'=>'', 'comment'=>'Comment', 'frequency'=>2, 'unitfrequency'=>3600, 'test'=>true), - // 1=>array('label'=>'My label', 'jobtype'=>'command', 'command'=>'', 'parameters'=>'', 'comment'=>'Comment', 'frequency'=>1, 'unitfrequency'=>3600*24, 'test'=>true) + 0=>array('label'=>'MyJob label', 'jobtype'=>'method', 'class'=>'/mymodule/class/mymodulemyjob.class.php', 'objectname'=>'MyModuleMyJob', 'method'=>'myMethod', 'parameters'=>'', 'comment'=>'Comment', 'frequency'=>2, 'unitfrequency'=>3600, 'status'=>0, 'test'=>true) + ); + // Example: $this->cronjobs=array(0=>array('label'=>'My label', 'jobtype'=>'method', 'class'=>'/dir/class/file.class.php', 'objectname'=>'MyClass', 'method'=>'myMethod', 'parameters'=>'', 'comment'=>'Comment', 'frequency'=>2, 'unitfrequency'=>3600, 'status'=>0, 'test'=>true), + // 1=>array('label'=>'My label', 'jobtype'=>'command', 'command'=>'', 'parameters'=>'', 'comment'=>'Comment', 'frequency'=>1, 'unitfrequency'=>3600*24, 'status'=>0, 'test'=>true) // );