J'ai trouvé la solution dans le module ps_wirepayment. Nous devons utiliser:
$this->warning = $this->trans('Account owner and account details must be configured before using this module.', array(), 'Modules.Wirepayment.Admin');
Exemple:
public function __construct()
{
$this->name = 'ps_wirepayment';
...
parent::__construct();
...
$config = Configuration::getMultiple(array('BANK_WIRE_DETAILS', 'BANK_WIRE_OWNER', 'BANK_WIRE_ADDRESS', 'BANK_WIRE_RESERVATION_DAYS'));
if (!empty($config['BANK_WIRE_OWNER'])) {
$this->owner = $config['BANK_WIRE_OWNER'];
}
if (!empty($config['BANK_WIRE_DETAILS'])) {
$this->details = $config['BANK_WIRE_DETAILS'];
}
if (!empty($config['BANK_WIRE_ADDRESS'])) {
$this->address = $config['BANK_WIRE_ADDRESS'];
}
if (!empty($config['BANK_WIRE_RESERVATION_DAYS'])) {
$this->reservation_days = $config['BANK_WIRE_RESERVATION_DAYS'];
}
if (!isset($this->owner) || !isset($this->details) || !isset($this->address)) {
$this->warning = $this->trans('Account owner and account details must be configured before using this module.', array(), 'Modules.Wirepayment.Admin');
}
if (!count(Currency::checkPaymentCurrencies($this->id))) {
$this->warning = $this->trans('No currency has been set for this module.', array(), 'Modules.Wirepayment.Admin');
}
}