Coder Social home page Coder Social logo

dolibarr_module_of's Introduction

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);
			}

dolibarr_module_of's People

Contributors

atm-adrien avatar atm-arnaud avatar atm-florian avatar atm-florianm avatar atm-gauthier avatar atm-greg avatar atm-gregr avatar atm-john avatar atm-jpb avatar atm-kevin avatar atm-lena avatar atm-marc avatar atm-maxime avatar atm-maximep avatar atm-nicolas avatar atm-quentin avatar atm-robin avatar atm-saamiperdrix avatar atm-thibaultf avatar cfoellmann avatar dolibit-ut avatar splohmer avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dolibarr_module_of's Issues

Les postes de travail ne sont pas créés dans un nouvel ordre de fabrication s'il est créé à partir de l'onglet "Ordre" ou "Produit". / Workstations are not create in new production order if create from order or product tab

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:

  • issue found on of module version 2.13.4, but also checked latest version in main branch 2.13.6

Steps to reproduce
path 1:

  • create a new order with a product containing a nomenclature with workstations attached
  • validate the order and switch to tab "Production"
  • click on button "create production orders"

path 2:

  • go to product which contains a nomenclature with workstations attached
  • got to tab "Production"
  • click on "create Production Order"
  • when the new production order is loaded, press "save"

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

  • for path 1: in oftools.class.php in fuction _createOFCommande is the implementation missing for loading the corresponding workstations

Error in 'printCommonFooter'

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

ODT template field not change

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

Compat issues

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 message erreur

Masquer le message "Aucun équipement créé" si les produits nécessaires ou à fabriqué n'ont pas de type d'équipement affecté.

Quantité non-conforme

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.

Problème Entrepôt Composant

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

Entrepôt sur OF

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

API

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.