css
December 7, 2023, 9:25am
1
Hi, i am on Dolibarr 18.0.3.
I am unable to find the right method to display the product - complementary attributes to the odt template. I tried to use all proposed method in the forum like:
{line_options_<attribute_code>}
{object_options_<attribute_code>}
No value, but {object_options_} work in proposal module.
Pls help… thank you
ksar
December 7, 2023, 9:30am
2
Hello,
Just read the wiki : Create an ODT document template - Dolibarr ERP CRM Wiki
You have to use :
{line_product_options_xxx} : If the line is a product, Value of the Product extra filed (where xxx is code of Product extra field)
css
December 8, 2023, 4:06am
3
Have tried all combination, does not output any value for the complementary attribute.
Do I need to declare any code for extrafields for the product.php?
ksar
December 8, 2023, 9:20am
4
Hello,
Normally not it’s automatic.
Most probably something wrong on your ODT.
css
December 9, 2023, 5:02am
5
Hi,
I have re-create a new odt with the following, still no value output.
{object_product_label}
{object_options_engineno}
{object_options_carmanufacturers}
{object_options_manufactured}
[!-- BEGIN row.lines --]
{line_product_options_engineno}
{line_test}
{line_product_test}
[!-- END row.lines --]
Do i need to add the following code to htdocs/mymodule/core/substitutions/functions_mymodule.lib.php * ?
function mymodule_completesubstitutionarray(&$substitutionarray,$langs,$object)
{
global $conf,$db;
$myvalue=‘Put here calculated value to insert’;
$substitutionarray[‘myowntag’]=$myvalue;
}