ODT Templates and Array of object attributes

Hello all!
I have two questions please:
1- I’m creating a new ODT template for the project module. My question here is when i create this ODT i want it to be converted to pdf. How can i do it?
2- I want to add a new attribute to the project module. But, this new attribute is an array of objects from another module. How can i add it as list of objects?
Thanks in advance

Hello,

Not simple, you need to install OpenOffice on the server where Dolibarr is installed. Depending on where it’s installed, it could be not possible.
search for it : SOLVED: ODT to PDF

You need to be a bit more explicit.

For question number 2:
I have a new module called “Store” module and I want inside the “project” module to add a new selector to choose multiple Stores for this project. So i want to add an extra attribute to the project module covering and following the previous workflow.

@ksar any kind of help in this issue? The second one which is creating a new attribute on Project module and this attribute should be contain multiple rowid of another module. The point that i want to create the selector of the Stores automatically in the project creation page.

Hello,

Sorry, but has explained above, if you are not able to provide details, I can’t help.

My crystal ball is broken…

Sorry, I thought that I explained a little bit more. Anyway, I will explain now:
I created a new module called “Stores” module. and already in the system there is “Project” module. So now when i create a new Project I want to assign it to many Stores directly and i want this to be done through Selector of multiple values. So, in my mind that i can add a new attribute to the Project module on its setting page in “Home → Setup → Modules/Application → Projects or leads → setup → complementary attributes (projects)” but here when i want to create the new attribute i don’t know how to add it as a multiple “link to an object”.
I hope that i could explain it.

Hello,

Sorry but it’s not enough, how your new module called “Store” has the list ?
Database ? Then use
image

List of values comes from a table
Syntax: table_name:label_field:id_field::filtersql
Example: c_typent:libelle:id::filtersql

  • id_field is necessarly a primary int key
  • filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.
    if you want to filter on extrafields use syntax extra.fieldcode=… (where field code is the code of extrafield)

In order to have the list depending on another complementary attribute list:
c_typent:libelle:id:options_parent_list_code|parent_column:filter

In order to have the list depending on another list:
c_typent:libelle:id:parent_list_code|parent_column:filter
Class ? THen use
image

Parameters must be ObjectName:Classpath
Syntax: ObjectName:Classpath

Examples:
Societe:societe/class/societe.class.php
Contact:contact/class/contact.class.php
Product:product/class/product.class.php
Project:projet/class/project.class.php

But remember that I don’t know how you have built your module “Stores”…


@ksar This what i meant. I added the new Stores selector field but the point here that in the creation of the Project the selector of Stores is added successfully but also i need to filter the Stores list according to the chosen Thirdparty. So in the new attribute ypu can see that i added fk_soc=515 which needs to be replaced with the right value of the chosen Thirdparty. Do you have any idea?

Hello @ksar ! About the last issue i sent, in the documentation, they said that i can use $ID$ but i want to use Thirdparty so i tried to use it like this: $Thirdparty$ but i didn’t work and it says:
Error in request SELECT rowid as rowid, b_number FROM llx_stores_branch WHERE fk_soc=$thirdparty$ Unknown column ‘$thirdparty$’ in ‘where clause’. Check setup of extra parameters.
Do you have any experience with this?