Dolibarr/dolibarr — pull request #313 by lrq3000 (2012-08-16 12:13:49+00:00)
Title: A lot of hooks and triggers implemented + custom substitution function for lines in ODT

Hello,

Here is a patch that implements a lot of hooks and triggers for a lot of core modules, here is the list:

action/calendrier, deplacement, dons, tva, contact/tiers, contrat, product lines, expedition, fournisseur commandes et factures (lines included), fiche intervention, projet et taches

This patch does not break any functionnality, and I tried to follow the nomenclatura the best I could:
- for hookmanager context, I took the english translation for the module's name
- for triggers, I took the french name as prefix + english suffix for the action

For order supplier and invoice supplier, I also implemented the lines hooks with the current templating system (for now, it seems these two modules have not yet moved to the new templating model using htdocs/core/tpl/freeproductline_action.tpl.php, but meanwhile I implemented the same hooks as they would be in the template).

Another thing: there are currently a few bugs in order supplier and invoice supplier, but they are not from my patch and I already filed 2 bugs on Doliforge about them (and my patch was done on Dolibarr v3.2.0 final and it works well there, I just ported the changes).

About lines, I added a few more $parameters, like 'line'=>$line because it is necessary in order to process correctly the line (else we have no way of telling which line is currently being processed).

This is a clean patch, there are a few fake mispatchs here and there (I don't know why, it shows a few lines as being changed when clearly there's no change, eg: htdocs/fourn/facture/fiche.php), so hopefully this should be a straightforward patch.