Fix #39245 set TRIGGER_PREFIX to BILL on Facture (#39497)

On 23.0 the generic CommonObject methods (setPaymentMethods,
setBankAccount, ...) build the trigger name from
$this->TRIGGER_PREFIX, falling back to get_class() when it is empty.
Facture does not declare it, so it fires FACTURE_MODIFY instead of the
BILL_* events the class uses everywhere else (BILL_CREATE, BILL_MODIFY,
...). Modules listening on BILL_MODIFY miss those changes.

Declare public $TRIGGER_PREFIX = 'BILL', like the other objects do
(Holiday='HOLIDAY', Workstation='WORKSTATION', BOM='BOM').

Signed-off-by: Dolicraft <contact@dolicraft.com>
Co-authored-by: Dolicraft <contact@dolicraft.com>
This commit is contained in:
w3houde 2026-08-13 19:21:43 +07:00 committed by GitHub
parent af6c24c0ce
commit 7a82187acd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -72,6 +72,11 @@ class Facture extends CommonInvoice
*/
public $element = 'facture';
/**
* @var string Prefix used to build trigger event names in generic CommonObject methods (BILL_MODIFY, ...)
*/
public $TRIGGER_PREFIX = 'BILL';
/**
* @var string Name of table without prefix where object is stored
*/