<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.dolibarr.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Chaos8028</id>
	<title>Dolibarr ERP CRM Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.dolibarr.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Chaos8028"/>
	<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php/Special:Contributions/Chaos8028"/>
	<updated>2026-10-30T23:48:20Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Canvas_development&amp;diff=27974</id>
		<title>Canvas development</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Canvas_development&amp;diff=27974"/>
		<updated>2012-11-06T22:37:34Z</updated>

		<summary type="html">&lt;p&gt;Chaos8028: /* Replace a creation form with your own template */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TemplateDocDevEn}}&lt;br /&gt;
&lt;br /&gt;
Canvas is a developer feature to replace screens to create, update or view a card (products, thirdparties, contacts, ...). &lt;br /&gt;
&lt;br /&gt;
For example, you can replace the input form to create a new third party, or to edit it, or replace the card used to view it.&lt;br /&gt;
&lt;br /&gt;
= Conditions =&lt;br /&gt;
Canvas feature is available with Dolibarr 3.2 or higher.&lt;br /&gt;
&lt;br /&gt;
It is for the moment available only for :&lt;br /&gt;
* &#039;&#039;&#039;create&#039;&#039;&#039; form of &#039;&#039;&#039;products&#039;&#039;&#039;, &#039;&#039;&#039;contacts&#039;&#039;&#039; and &#039;&#039;&#039;third parties&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;edit&#039;&#039;&#039; form of &#039;&#039;&#039;products&#039;&#039;&#039;, &#039;&#039;&#039;contacts&#039;&#039;&#039; and &#039;&#039;&#039;third parties&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;view&#039;&#039;&#039; tab of &#039;&#039;&#039;products&#039;&#039;&#039;, &#039;&#039;&#039;contacts&#039;&#039;&#039; and &#039;&#039;&#039;third parties&#039;&#039;&#039;. In most cases, it&#039;s only the first tab when you open the card of an object. But you can have a look at new module creation documentation [[Module_development#The_tab_management]] to know how to disable other tabs or add yours if you really want to change other tabs too.&lt;br /&gt;
&lt;br /&gt;
= Replace a creation form with your own template =&lt;br /&gt;
First thing to do is to find the URL of standard creation form you want to replace and add the parameter &#039;&#039;&#039;canvas=mymodule@mycanvas&#039;&#039;&#039;. To find url, you can go on page and get URL found at top of your browser.&lt;br /&gt;
&lt;br /&gt;
For example, imagine you want to replace the creation form of third parties with your own form. The url is something like&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;http://mydomain/societe/soc.php?action=create&amp;amp;leftmenu=customers&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
After adding the canvas parameter, URL will look like&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;http://mydomain/societe/soc.php?action=create&amp;amp;leftmenu=customers&amp;amp;canvas=mycanvas@mymodule&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When you add a parameter canvas=mycanvas@mymodule on a create page, Dolibarr will use the template file into htdocs called&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;/&#039;&#039;mymodule&#039;&#039;/canvas/&#039;&#039;mycanvas&#039;&#039;/tpl/&#039;&#039;tabname&#039;&#039;_create.tpl&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
* &#039;&#039;&#039;mymodule&#039;&#039;&#039; directory is value mymodule found into canvas parameter (you choose this value and create directory with same value. use lower case values).&lt;br /&gt;
* &#039;&#039;&#039;mycanvas&#039;&#039;&#039; is value mycanvas found into canvas parameter (you choose this value and create directory with same value. use lower case value).&lt;br /&gt;
* &#039;&#039;&#039;tabname&#039;&#039;&#039; is name of tab or page where initial form was stored. In most cases it is value &amp;quot;card&amp;quot;.  &lt;br /&gt;
&lt;br /&gt;
For example, we will use value &amp;quot;&#039;&#039;&#039;societe@company&#039;&#039;&#039;&amp;quot; for canvas parameter. This is a value of an already coded demo canvas template for third parties, not used in a standard usage of Dolibarr but provided as &amp;quot;demo&amp;quot;. So URL to create a third party using this alternative template is now:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;http://mydomain/societe/soc.php?action=create&amp;amp;leftmenu=customers&amp;amp;canvas=societe@company&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This means the form to create the third party will be found into template file:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;/societe/canvas/company/tpl/card_create.tpl&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
So to use you own template, just choose a value for &#039;&#039;&#039;mymodule&#039;&#039;&#039;, &#039;&#039;&#039;mycanvas&#039;&#039;&#039;, copy and paste a demo template found into Dolibarr directories with new directory and new file name and then edit the template like you want. Template contains all the part under the top menu and at right of left menu. You can change look, field order, add your javascript controls, remove or add your own fields. The only requirement is to keep mandatory fields with same name to avoid errors when you will submit the page. Fields removed will be filled with null or 0 into database. New fields for the moment are ignored. We will see later how we can add code to save them.&lt;br /&gt;
&lt;br /&gt;
Once this is done, you must now add the new create URL into Dolibarr menus or replace the existing one with new one. For this take a look at page [[Menus_system]].&lt;br /&gt;
&lt;br /&gt;
Note that when a record is saved using a canvas, the canvas name &#039;&#039;&#039;mymodule@mycanvas&#039;&#039;&#039; is also stored into database. This is important because this means, Dolibarr will be able to know that this record is a canvas and not the other so it will be able to them suggest a view or edit form dedicated for this record only and keep using standard forms for other records. See next chapters.&lt;br /&gt;
&lt;br /&gt;
= Replace an edit form with your own template =&lt;br /&gt;
Using your own edit form for a record saved using your own create form is as simple as adding a file called&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;/mymodule/canvas/mycanvas/tpl/tabname_edit.tpl&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
* &#039;&#039;&#039;mymodule&#039;&#039;&#039; directory is value mymodule you used as canvas parameter to create record (see previous chapter).&lt;br /&gt;
* &#039;&#039;&#039;mycanvas&#039;&#039;&#039; is value mycanvas you used as canvas parameter to create record (see previous chapter).&lt;br /&gt;
* &#039;&#039;&#039;tabname&#039;&#039;&#039; is name of tab or page to edit record. In most cases it is value &amp;quot;card&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
With our canvas demo societe@company, edit template will be into file&lt;br /&gt;
  &lt;br /&gt;
&#039;&#039;&#039;/societe/canvas/company/tpl/card_edit.tpl&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Note that for edit, changing URL is not necessarly required. Dolibarr can detect your record is a personalized canvas record and automatically scan for this template file to show it if found. If not, standard form will be used. So all you have to do to use your own edit template is copy and paste an existing demo edit template file and rename it with correct value of mymodule and mycanvas and edit it to match your need.&lt;br /&gt;
Like for creation, all mandatory fields must be kept to avoid errors when submitting the form to save change.&lt;br /&gt;
&lt;br /&gt;
= Replace a view form with your own template =&lt;br /&gt;
Using your own view form for a record saved using your own create form is as simple as adding a file called&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;/mymodule/canvas/mycanvas/tpl/tabname_view.tpl&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
* &#039;&#039;&#039;mymodule&#039;&#039;&#039; directory is value mymodule you used as canvas parameter to create record (see previous chapter).&lt;br /&gt;
* &#039;&#039;&#039;mycanvas&#039;&#039;&#039; is value mycanvas you used as canvas parameter to create record (see previous chapter).&lt;br /&gt;
* &#039;&#039;&#039;tabname&#039;&#039;&#039; is name of tab or page to edit record. In most cases it is value &amp;quot;card&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
With our canvas demo societe@company, view template will be into file&lt;br /&gt;
  &lt;br /&gt;
&#039;&#039;&#039;/societe/canvas/company/tpl/card_view.tpl&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Note that for view, changing URL is not necessarly required. Dolibarr can detect your record is a personalized canvas record and automatically scan for this template file to show it if found. If not, standard form will be used. So all you have to do to use your own view template is copy and paste an existing demo view template file and rename it with correct value of mymodule and mycanvas and edit it to match your need.&lt;br /&gt;
&lt;br /&gt;
= Add code to manage new fields =&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
Example into external module cabinetmed.&lt;/div&gt;</summary>
		<author><name>Chaos8028</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Hooks_system&amp;diff=26494</id>
		<title>Hooks system</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Hooks_system&amp;diff=26494"/>
		<updated>2012-07-14T17:29:03Z</updated>

		<summary type="html">&lt;p&gt;Chaos8028: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TemplateDocDevEn}}&lt;br /&gt;
&lt;br /&gt;
Hooks is a developer feature, available with Dolibarr 3.2 and more, to allow developer to add personalized code intod Dolibarr core code with no need to patch Dolibarr.&lt;br /&gt;
On the contrary to the [[triggers]] (another feature to interact with Dolibarr code) which are by definition linked to a business action, hooks can happen anywhere at anytime, they are entry points into the program.&lt;br /&gt;
* Hooks work by context (ie the module, eg: &amp;quot;productcard&amp;quot; for products, &amp;quot;invoicecard&amp;quot; for invoices, etc..). It&#039;s easy to find them, just search for &amp;quot;&#039;&#039;&#039;initHooks(&#039;&#039;&#039;&amp;quot; into php files.&lt;br /&gt;
* Hooks are functions that can be overloaded by your own. You decide if your code is added to standard Dolibarr code or if it replace Dolibarr code. You can find overloadable functions by searching for &amp;quot;&#039;&#039;&#039;executeHooks(&#039;&#039;&#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Implementation =&lt;br /&gt;
&lt;br /&gt;
To use a hook (add or replace a part of code), you first need to already have defined a module (see the wiki for that), and then you need to do 2 things:&lt;br /&gt;
&lt;br /&gt;
1- add your module to the list of contexts you want to hook on.&lt;br /&gt;
This means that when a context you hook will happen, your module hook code will be called.&lt;br /&gt;
To do that, just edit your &#039;&#039;&#039;/htdocs/&#039;&#039;yourmodulename&#039;&#039;/modules/mod&#039;&#039;YourModuleName&#039;&#039;.class.php&#039;&#039;&#039; and edit the &#039;&#039;&#039;$this-&amp;gt;module_parts&#039;&#039;&#039; variable with something like this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;module_parts = array(&lt;br /&gt;
&#039;hooks&#039; =&amp;gt; array(&#039;hookcontext1&#039;,&#039;hookcontext2&#039;)  // Set here all hooks context managed by module&lt;br /&gt;
);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course change YourModuleName with your own module&#039;s name.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT&#039;&#039;&#039;: Be careful: do not forget to DISABLE then RENABLE the module in the admin panel to accept the new context, because these constants are only added to the database when enabling the module.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2- You will overload a hook (a function) with your own.&lt;br /&gt;
&lt;br /&gt;
Create a file &#039;&#039;&#039;/htdocs/&#039;&#039;yourmodulename&#039;&#039;/class/actions_&#039;&#039;yourmodulename&#039;&#039;.class.php&#039;&#039;&#039; and then put something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
class ActionsYourModuleName // extends CommonObject &lt;br /&gt;
{ &lt;br /&gt;
 &lt;br /&gt;
    /** Overloading the doActions function : replacing the parent&#039;s function with the one below &lt;br /&gt;
     *  @param      parameters  meta datas of the hook (context, etc...) &lt;br /&gt;
     *  @param      object             the object you want to process (an invoice if you are in invoice module, a propale in propale&#039;s module, etc...) &lt;br /&gt;
     *  @param      action             current action (if set). Generally create or edit or null &lt;br /&gt;
     *  @return       void &lt;br /&gt;
     */ &lt;br /&gt;
    function doActions($parameters, $object, $action) &lt;br /&gt;
    { &lt;br /&gt;
        print_r($parameters); &lt;br /&gt;
        echo &amp;quot;action: &amp;quot;.$action; &lt;br /&gt;
        print_r($object); &lt;br /&gt;
 &lt;br /&gt;
        if ($parameters-&amp;gt;context == &#039;somecontext&#039;) &lt;br /&gt;
        { &lt;br /&gt;
          // do something only for the context &#039;somecontext&#039;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
} &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
* &#039;&#039;&#039;$parameters&#039;&#039;&#039; is an array of meta-data about the datas contained by the hook (eg: the context, always accessible by $parameters-&amp;gt;context).&lt;br /&gt;
* &#039;&#039;&#039;$object&#039;&#039;&#039; is the object that you may work on. Eg: the product if you are in the productcard context.&lt;br /&gt;
* &#039;&#039;&#039;$action&#039;&#039;&#039; is the action if one is conveyed (generally &amp;quot;create&amp;quot;, &amp;quot;edit&amp;quot; or &amp;quot;view&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Your function should now be called when you access the module/context and you will see the parameters and object and action.&lt;br /&gt;
&lt;br /&gt;
= List of available Hooks =&lt;br /&gt;
How to find a complete list of all available hooks ? &lt;br /&gt;
Just search for &amp;quot;&#039;&#039;&#039;executeHooks(&#039;&#039;&#039;&amp;quot; through the code and you should easily find all the hooked methods calls.&lt;br /&gt;
&lt;br /&gt;
This is however a small list of them (not complete):&lt;br /&gt;
{{ListOfHooks}}&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [[Triggers]]&lt;br /&gt;
* [[Interfaces Dolibarr toward foreign systems]]&lt;br /&gt;
* [[Interfaces from foreign systems toward Dolibarr]]&lt;/div&gt;</summary>
		<author><name>Chaos8028</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Documentaci%C3%B3n_Desarrolladores&amp;diff=23880</id>
		<title>Documentación Desarrolladores</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Documentaci%C3%B3n_Desarrolladores&amp;diff=23880"/>
		<updated>2011-10-24T00:19:51Z</updated>

		<summary type="html">&lt;p&gt;Chaos8028: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Información general =&lt;br /&gt;
Este capítulo incluye información general que es necesaria leer antes de comenzar cualquier desarrollo en Dolibarr.&lt;br /&gt;
# [[Proyecto Dolibarr]]&lt;br /&gt;
# [[Antes de Empezar|A saber antes de empezar]]&lt;br /&gt;
# [[Herramientas de Desarrollo|Entorno y Herramientas de desarrollo]]&lt;br /&gt;
# [[Librerías externas y dependencias]]&lt;br /&gt;
# [[Recuperar, actualizar GIT fuentes del proyecto|Recuperar una versión desde los fluentes]]&lt;br /&gt;
&lt;br /&gt;
= Normas de Desarrollo =&lt;br /&gt;
# [[Lenguaje y Normas de Desarrollo|Lenguaje y normas de desarrollo]]&lt;br /&gt;
&lt;br /&gt;
= La Base de datos =&lt;br /&gt;
# [[Carta de nomenclaturas]]&lt;br /&gt;
# [[:Category:Table SQL|Listado de tablas]]&lt;br /&gt;
&lt;br /&gt;
= Listado de módulos existentes =&lt;br /&gt;
La documentación específica de un módulo funcional estándar de Dolibarr se encuentra en la página del módulo.&lt;br /&gt;
&lt;br /&gt;
* El listado de módulos estándar está disponible en la página [[:Category:Listado de Módulos|Listado de Módulos]]&lt;br /&gt;
* El Listado de módulos complementarios se encuentra en la página [[:Category:Módulos_complementarios|Módulos complementarios]]&lt;br /&gt;
&lt;br /&gt;
= Desarrollar un nuevo módulo/extensión para el GUI (nuevas pantallas) =&lt;br /&gt;
Esta sección describe cómo desarrolllar un nuevo módulo sobre la interfaz de usuario de Dolibarr (GUI). Un módulo para IHM contiene tanto pantallas como datos propios y una hoja de estilo. El desarrollo del script no entra en esta parte y está descrito en el capítulo siguiente. El desarrollo de módulos de numeración, de documentos, de temas o de disparadores también se describe en los capítulos siguientes.&lt;br /&gt;
&lt;br /&gt;
Para desarrollar tu propio módulo de extensión de GUI, ve al tutorial: [[Desarrollo de un módulo]]&lt;br /&gt;
&lt;br /&gt;
= Desarrollar un script en línea de comandos o lote =&lt;br /&gt;
Esta sección describe cómo desarrollar su propio script de comandos por lotes para realizar procesos en Dolibarr (lectura, escritura, etc.).&lt;br /&gt;
La realización de modificaciones del interfaz de usuario (GUI) no entra dentro de este perímetro. Véase el capítulo anterior para ello.&lt;br /&gt;
&lt;br /&gt;
Para desarrollar un script de comandos de cualquier tipo, tales como un script de proceso o un script para importar los datos desde otro sistema, consulte la página: [[Desarrollo de scripts]]&lt;br /&gt;
&lt;br /&gt;
= Técnica sistemas de Dolibarr =&lt;br /&gt;
== Árbol de archivos ==&lt;br /&gt;
La jerarquía de los archivos de la versión actual es visible en la [http://www.dolibarr.org/html_doxygen/index.html documentación doxygen de los fuentes].&lt;br /&gt;
&lt;br /&gt;
Sin embargo, las rutas a usar para añadir sus archivos en la creación de un nuevo módulo son descritas en la documentación para el desarrollo de un nuevo módulo (ver más abajo).&lt;br /&gt;
&lt;br /&gt;
== El Sistema de Parametrización ==&lt;br /&gt;
Existen 3 niveles de parametrización en Dolibarr.&lt;br /&gt;
* La configuración técnica de Dolibarr (modo de autentificación en la aplicación, identificador de la base de datos y la localización del espacio de almacenamiento de ficheros) está definida en el fichero único de configuración conf/conf.php. Ver [[Fichero de configuración]] para más información.&lt;br /&gt;
* El global se guarda en la [[Table llx_const]]. Ver la página [[ConstantesES|Constantes]].&lt;br /&gt;
* La parametrización propia a un usuario se guarda en la [[Table llx_user_param]]. Ver la página [[ConstantesES|Constantes]].&lt;br /&gt;
&lt;br /&gt;
== Los objetos de negocio ==&lt;br /&gt;
Ver la página [[Objetos de negociado]]&lt;br /&gt;
&lt;br /&gt;
== El Sistema de menús ==&lt;br /&gt;
Ver la página [[Sistema de menús]]&lt;br /&gt;
&lt;br /&gt;
== El Sistema de pestañas ==&lt;br /&gt;
Ver la página [[Sistema de pestañas]]&lt;br /&gt;
&lt;br /&gt;
== El Sistema de temas ==&lt;br /&gt;
Ver la página [[Temas]]&lt;br /&gt;
&lt;br /&gt;
== El Sistema de paneles ==&lt;br /&gt;
Ver la página [[Sistema de paneles]]&lt;br /&gt;
&lt;br /&gt;
== El Sistema de autenticación ==&lt;br /&gt;
Ver la página [[Autentificación]]&lt;br /&gt;
&lt;br /&gt;
== El Sistema de permisos ==&lt;br /&gt;
Ver la página [[Permisos]]&lt;br /&gt;
&lt;br /&gt;
== El Sistema de traducción ==&lt;br /&gt;
Ver la página [[Sistema de traducción]]&lt;br /&gt;
&lt;br /&gt;
== La Gestión de errores ==&lt;br /&gt;
Ver la página [[Gestión de errores]]&lt;br /&gt;
&lt;br /&gt;
== El sistema Canvas (sobrecarga de pantallas) ==&lt;br /&gt;
Canvas es una funcionalidad destinada a desarrolladores para reemplazar a las pantallas de creación, actualización o visualización de fichas (productos, terceros, contactos, ...). Por ejemplo, puede reemplazar el formulario de creación de terceros, el de actualización o el de visualización.&lt;br /&gt;
&lt;br /&gt;
Vea la página [[Desarrollo Canvas]]&lt;br /&gt;
&lt;br /&gt;
== El sisteme Triggers ==&lt;br /&gt;
Ver [[Interfaces Dolibarr hacia el exterior|Interfaces y enlaces con otras aplicaciones]].&lt;br /&gt;
&lt;br /&gt;
== El sistema Hooks ==&lt;br /&gt;
Vea la página [[El sistema Hooks]]&lt;br /&gt;
&lt;br /&gt;
== Services Web ==&lt;br /&gt;
Ver [[Módulo Services Web]]&lt;br /&gt;
&lt;br /&gt;
== El almacenamiento de ficheros/documentos ==&lt;br /&gt;
Ver la página [[Documentos generados]]&lt;br /&gt;
&lt;br /&gt;
== Los módulos de numeración ==&lt;br /&gt;
Para cada entidad creada en la aplicación, Dolibarr le asigna una referencia. Con el fin de adaptar la referencia a cualquier uso, Dolibarr utiliza módulos para definir la regla de generación de esta referencia. Los módulos se suministran como estándar, por lo tanto, algunos son genéricos y se utilizan para definir la máscara de numeración (x número de caracteres, con o sin prefijo, incluyendo la fecha o no, etc), pudiendo satisfacer la mayoría de las necesidades. Sin embargo, aún hay casos en los que el módulo estándar incluido no responde a la necesidad. En este caso es necesario para desarrollar su propio módulo de numeración.&lt;br /&gt;
&lt;br /&gt;
Más información en la página [[Crear un módulo de numeración]]&lt;br /&gt;
&lt;br /&gt;
== Los modelos y la generación de documentos ==&lt;br /&gt;
Información referente a la generación de documentos desde modelos disponible en la página [[Crear un modelo de documento PDF]] o [[Crear un modelo de documento ODT]]&lt;br /&gt;
&lt;br /&gt;
= Las exportaciones/importaciones en masa =&lt;br /&gt;
#[[Importaciones|Importaciones en masa]]&lt;br /&gt;
#[[Exportaciones|Exportaciones en masa]]&lt;br /&gt;
&lt;br /&gt;
= Interfaces y enlaces con otras aplicaciones =&lt;br /&gt;
# [[Interfaces Dolibarr hacia el exterior]] (Triggers Dolibarr)&lt;br /&gt;
# [[Interfaces del Exterior hacia Dolibarr]]&lt;br /&gt;
# [[Módulo Services Web|Services Web]]&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
Todos los FAQ se encuentran disponibles desde la página índice [[:Category:FAQ ES|FAQ ES]]&lt;/div&gt;</summary>
		<author><name>Chaos8028</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Objetos_de_negociado&amp;diff=23879</id>
		<title>Objetos de negociado</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Objetos_de_negociado&amp;diff=23879"/>
		<updated>2011-10-24T00:09:21Z</updated>

		<summary type="html">&lt;p&gt;Chaos8028: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TemplateDocDesarrollo}}&lt;br /&gt;
= Objetos de negocio =&lt;br /&gt;
Todos los objetos de negocio se definen mediante clases PHP que hereda de la clase CommonObject (definida en el archivo commonobject.class.php).&lt;br /&gt;
Todos los objetos de negocio tienen los 4 métodos CRUD:&lt;br /&gt;
* Creación: create()&lt;br /&gt;
* Lectura: fetch()&lt;br /&gt;
* Actualización: update()&lt;br /&gt;
* Borrado: delete()&lt;br /&gt;
&lt;br /&gt;
= Objetos de negocio vinculados =&lt;br /&gt;
Algunos objetos de negocio se encuentran vinculados con otros. En Dolibarr esto se hace usando la [[Table llx_element_element]]. Pero no tiene que leer esta tabla para obtener objetos vinculados a otro.&lt;br /&gt;
Este es un trozo de código que le muestra como hacerlo:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Cargamos el array linked_object con objetos que se vinculan con uno&lt;br /&gt;
$object-&amp;gt;load_object_linked($object-&amp;gt;id, $object-&amp;gt;element);&lt;br /&gt;
&lt;br /&gt;
// Elegimos id con los objetos del tipo que necesitamos&lt;br /&gt;
$org_order_array = $object-&amp;gt;linked_object[&amp;quot;commande&amp;quot;];&lt;br /&gt;
&lt;br /&gt;
// Lo usamos&lt;br /&gt;
$thelinkedobjectid = $org_order_array[0];&lt;br /&gt;
// creamos una instancia de pedido&lt;br /&gt;
$thelinkedobject = new Commande($object-&amp;gt;db);&lt;br /&gt;
// Cargamos el objeto&lt;br /&gt;
$thelinkedobject-&amp;gt;fetch($thelinkedobjectid);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Ejemplos =&lt;br /&gt;
== Ejemplo para la creación de un tercero ==&lt;br /&gt;
He aquí un ejemplo para la creación de un tercero (empresa cliente, por ejemplo):&lt;br /&gt;
&lt;br /&gt;
Si se encuentra en el caso de un script externo a Dolibarr, antes de nada es necesario realizar un inicio.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
include(&#039;/pathofdolibarrhtdocs/master.inc.php&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
para que el entorno Dolibarr (objetos $conf, $db, $lang y $user sean creados). Si queremos que las acciones (creación, actualización), se asocien a un usuario en particular, es necesario hacerlo despues del include de master.inc.php &lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$user-&amp;gt;fetch(0,&#039;loginuser&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Seguidamente, podremos realizar nuestras acciones.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Declaramos la clase que vamos a manipular&lt;br /&gt;
include_once(&#039;/pathofdolibarrhtdocs/societe/class/societe.class.php&#039;);&lt;br /&gt;
&lt;br /&gt;
// Creamos una instancia del objeto a manipular&lt;br /&gt;
$mycompany = new Societe($db);&lt;br /&gt;
&lt;br /&gt;
// Indicamos sus características&lt;br /&gt;
$mycompany-&amp;gt;nom=&#039;Big Brother&#039;;&lt;br /&gt;
$mycompany-&amp;gt;client=1;&lt;br /&gt;
&lt;br /&gt;
// Si queremos que la acción de creación se asocie a un usuario &#039;loginuser&#039; en particular,&lt;br /&gt;
// hay que descomentar esta linea para cambiar las caracteriísticas de este usuario.&lt;br /&gt;
// Si lo dejamos comentado, Dolibarr meterá un null en los campos de usuario de creacion o actualización.&lt;br /&gt;
// $user-&amp;gt;fetch(&#039;loginuser&#039;);&lt;br /&gt;
&lt;br /&gt;
// Llamamos a la creación&lt;br /&gt;
$id=$mycompany-&amp;gt;create($user);&lt;br /&gt;
&lt;br /&gt;
// Para cambiar el objeto&lt;br /&gt;
$mycompany-&amp;gt;fetch($id);&lt;br /&gt;
&lt;br /&gt;
// Para actualizar&lt;br /&gt;
$mycompany-&amp;gt;nom=&#039;Big Brother 2&#039;;&lt;br /&gt;
$mycompany-&amp;gt;update($user);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Otros ejemplos ==&lt;br /&gt;
Encontrará otros ejemplos de manipulación de objetos Dolibarr (Creación, Lectura, Modificación, Eliminación) en el directorio &#039;&#039;&#039;dev/samples&#039;&#039;&#039; del snapshot de Dolibarr.&lt;/div&gt;</summary>
		<author><name>Chaos8028</name></author>
	</entry>
</feed>