atm-consulting / dolibarr_module_of Goto Github PK
View Code? Open in Web Editor NEWGestion d'ordre de fabrication
Gestion d'ordre de fabrication
3.5 et inférieur === Création d'un trigger nécessaire à la modification du nouveau champs 'compose_fourni' lors de l'ajout d'un prix fournisseur. Bout de code à rajouter sur le fichier /htdocs/fourn/class/fournisseur.product.class.php : // Appel des triggers include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; $interface=new Interfaces($this->db); $result=$interface->run_triggers('UPDATE_BUYPRICE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers A rajouter après ligne 203 : dol_syslog(get_class($this).'::update_buyprice sql='.$sql); $resql = $this->db->query($sql); if ($resql) { $this->db->commit(); === Appel de hook rajouté sur /htdocs/product/fournisseurs.php ligne 296 après : $supplier=new Fournisseur($db); $supplier->fetch($socid); print $supplier->getNomUrl(1); print '<input type="hidden" name="id_fourn" value="'.$socid.'">'; print '<input type="hidden" name="ref_fourn" value="'.$product->fourn_ref.'">'; print '<input type="hidden" name="ref_fourn_price_id" value="'.$rowid.'">'; code ajouté : if (is_object($hookmanager)) { $parameters=array('id_fourn'=>$id_fourn,'prod_id'=>$product->id); $reshook=$hookmanager->executeHooks('formEditThirdpartyOptions',$parameters,$object,$action); }
Description
Currently the workstations are not created in a new production order if the production order is created from either an order or from the product tab.
Affected versions:
Steps to reproduce
path 1:
path 2:
Current behaviour
production order is created but without defined workstation steps
Expected behaviour
production order is created with workstation steps defined in the corresponding product nomenclature
Additional information
The debug bar gives this error
2019-09-16 10:06:13 ERR Error: Bug into hook printCommonFooter of module class Actionsof. Method must not return a string but an int (0=OK, 1=Replace, -1=KO) and set string into ->resprints
I will look into this but just wanted to leave a notice. Maybe someone else instantly knows what the issue is
Hello,
I try to add some field in a new odt template for orderfab ticket.
I had a block with this content [societe] to display the client name but it's keep display [societe] instead of the content.
But the var contain something in function $TBS->render($locationTemplate, ...) of fiche_if.php file.
Why it's not replace ?
Moreover, my company logo doesn't appear at the top of the document (with the exemple odt file available in this repo)
Thanks for help
Hi @atm-greg and others form @ATM-Consulting,
I have two minor issues with (all) ATM modules.
First:
set_time_limit(120);
the function is widely considered risky so it results in warnings due to blocked functions.
My suggestion is:
@set_time_limit(120);
to silence the warning
Second:
The config.default.php start with
if(is_file('../main.inc.php'))$dir = '../';
else if(is_file('../../../main.inc.php'))$dir = '../../../';
else if(is_file('../../../../main.inc.php'))$dir = '../../../../';
else if(is_file('../../../../../main.inc.php'))$dir = '../../../../../';
else $dir = '../../';
which results in php notices when the module is in the common path htdocs/custom/modulename
.
My suggestion is change to:
if(is_file('../main.inc.php'))$dir = '../';
else if(is_file('../../main.inc.php'))$dir = '../../'; // add this line
else if(is_file('../../../main.inc.php'))$dir = '../../../';
else if(is_file('../../../../main.inc.php'))$dir = '../../../../';
else if(is_file('../../../../../main.inc.php'))$dir = '../../../../../';
else $dir = '../../';
What do you guys think?
Masquer le message "Aucun équipement créé" si les produits nécessaires ou à fabriqué n'ont pas de type d'équipement affecté.
Lors du passage en production d'un OF, valider automatiquement le projet associé à l'OF
Options:
Gestion non-conforme activé
Module équipement activé
Si on modifie un OF avant de le terminer, puis on déclare une quantité non-conforme égale à la quantité à produire (càd 0 pièces conforme dans la fabrication) puis on termine l'OF, le système suppose que la fabrication est conforme et le mouvement de stock est fait à la quantité initiale à produire !
-> pas de calcul fait entre la quantité de lacement, la quantité conforme et la quantité non-conforme.
Non-prise en compte de l’entrepôt de l’équipement du composant sur l’OF :
Sur la fiche_of , le déstockage ne prend pas en compte l’entrepôt de l’équipement choisie en composant. Théoriquement, la consommation du composant doit se faire depuis l’entrepôt de l'équipement choisi.
Options désactivées :
Permets de définir manuellement les entrepôts à utiliser pour le stockage/déstockage des équipements sur chaque OF
Permets de définir des entrepôts par défaut pour le stockage/déstockage des équipements
Non-prise en compte de l’entrepôt de l’équipement du composant sur l’OF :
Sur la fiche_of , le déstockage ne prend pas en compte l’entrepôt de l’équipement choisie en composant. Théoriquement, la consommation du composant doit se faire depuis l’entrepôt de l'équipement choisi.
Options désactivées :
Permets de définir manuellement les entrepôts à utiliser pour le stockage/déstockage des équipements sur chaque OF
Permets de définir des entrepôts par défaut pour le stockage/déstockage des équipements
Bonjour,
J'essai d'ajouter une petite API assez simple au module mais j'ai des soucis pour la connexion à la base de donnée
Voici l'erreur :
PDO DB ErrorConnexion : SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO) ( mysql:dbname=dolibarr;host=localhost;port=8889;charset=latin1 - root ) < L. 118 Modof__construct() dans /Applications/MAMP/htdocs/doli/htdocs/includes/restler/framework/Luracast/Restler/Scope.php < L. 1047 Luracast\Restler\Scopeget() dans /Applications/MAMP/htdocs/doli/htdocs/includes/restler/framework/Luracast/Restler/Restler.php < L. 304 Luracast\Restler\Restlercall() dans /Applications/MAMP/htdocs/doli/htdocs/includes/restler/framework/Luracast/Restler/Restler.php < L. 230 Luracast\Restler\Restlerhandle() dans /Applications/MAMP/htdocs/doli/htdocs/api/index.php
alors que cela marche bien via les pages de Dolibarr.
Je penche donc pour un probleme d'authentification ?.
Des idées ?
Le code de l'API
function __construct()
{
global $user, $db, $conf, $langs;
$this->PDOdb=new TPDOdb;
$this->assetof = new TAssetOF;
}
/**
* Get Properties of Fabrication order object
*
* Get details of an Fabrication order
* @param int $id ID of of
* @return array|mixed data without useless information
*
* @throws RestException
*/
function get($id){
$result = $this->assetof->load($this->PDOdb,$id);
if( ! $result ) {
throw new RestException(404, 'OF not found');
}
return $this->assetof;
}
avec l'include de ordre_fabrication_asset.class.php
Merci
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.