Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Use of deprecated Dolibarr field #92

Open
madmaxpt opened this issue May 22, 2023 · 0 comments
Open

Use of deprecated Dolibarr field #92

madmaxpt opened this issue May 22, 2023 · 0 comments

Comments

@madmaxpt
Copy link

The field "modelpdf" is deprecated since Dolibarr 14 (https://github.com/Dolibarr/dolibarr/blob/develop/htdocs/core/class/commonobject.class.php#L436) and when saving an invoice to the database, Dolibarr stores the content of the "model_pdf" variable : https://github.com/Dolibarr/dolibarr/blob/develop/htdocs/compta/facture/class/facture.class.php#L2546

Since Woosync only uses the deprecated field (https://github.com/OPEN-DSI/ecommerceng_woosync/blob/2022.5.3/class/business/eCommerceSynchro.class.php#L5014), its content is never stored in the database and when the invoice is refreshed (https://github.com/OPEN-DSI/ecommerceng_woosync/blob/2022.5.3/class/business/eCommerceSynchro.class.php#L5873), it is always reset to empty and the invoice PDF is never generated when synchronising orders from Woocommerce

Consider setting the new field or using the setDocModel method which sets both variables (https://github.com/Dolibarr/dolibarr/blob/develop/htdocs/core/class/commonobject.class.php#L2876)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant