-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serious Bug: When creating an invoice from a sales order, the content of the extrafields is not fetched from the database #14649
Comments
Hello, Maybe you missed : https://wiki.dolibarr.org/index.php/Setup_Other THIRDPARTY_PROPAGATE_EXTRAFIELDS_TO_ORDER => Copy also extrafields from thirdparty to order (if name match). ► (v11.0+) |
Thank you BebZ for your suggestion. I tried adding the THIRDPARTY_PROPAGATE_EXTRAFIELDS_TO_ORDER parameter, but it didn't work. As mentioned above, my problem is not with copying extrafields from third parties to orders, but with fetching the content of the order's extrafield, when creating an invoice from the order. |
i will ask my dev to know how we do it... he's back on 16th of september... we never had this problem and we are fetching extrafields from orders to shipments but I don't know if it works for extrafields between orders and invoices :) |
@atm-maxime |
? |
With the branch 12 (future 12.0.3), it works for me fine. |
simnandez, thank you for your info. So, you say that the current development version of Dolibarr doesn't have this bug ? I have Dolibarr 12.0.2 installed and it has the bug. Version 12.0.2 is currently the latest 'stable' version. Are you sure that in the current development version, which will be the future 12.0.3 version, the extrafield content is fetched correctly from the database when creating an invoice from a sales order ? Because I tried copying the |
Thank you and hope that works for future, but my statement: this is really not a serious bug |
dolibit-ut, for me it's a serious bug, because it's very inefficient to copy the content of the extrafield from the sales order manually and insert it in the empty extrafield of the new invoice. It should be fetched automatically. This bug also affects shipments. When I create a shipment from a sales order having an extrafield, the new shipment is created with an empty extrafield. Also, there is no workaround for this bug, as I explained. I lost 2 days trying to find a solution to this bug and I couldn't. It's very frustrating, since it worked so well in version 11 but it doesn't work in version 12.0.2, and it seems to me that it doesn't work in 12.0.1 and 12.0.0 either. |
@simnandez It doesn't work in 12.0.3 either. I installed 12.0.3 from scratch, yet it doesn't work. It's a nightmare. I lost so much time trying to solve this in vain. Once again: When you try to create an invoice from a sales order that has an extrafield, the content of the extrafield is not fetched from the database. Why it worked in version 11 and in version 12.0.0, 12.0.1, 12.0.2 and 12.0.3 it doesn't work ? Are you all happy with entering the content of extrafields manually when you make invoices from orders ? |
@Fred-Zweig , bug occurs only for extrafields of type html, text, select, int. |
@FHenry thank you so much for your fix. You are a hero. I tried to apply your modification to the What can I do to have your pull request merged more quickly ? Should I ping eldy ? Who else has the right to merge pull requests ? |
Bug
When I try to create an invoice from a sales order that has an extrafield, the content of the extrafield is not fetched from the database:
Environment
Expected behavior
When clicking on the 'Create invoice' button below the product lines of a sales order, the 'New invoice' form should fetch the content of the order's etrafield, to insert it in the corresponding invoice extrafield. This works in Dolibarr version 11 as seen below, but not in versions 12.0.0, 12.0.1, 12.0.2.
I created the extrafield correctly for sales orders and for invoices and it has nothing special: Position: 100, Type: long text, Size: 2000, Computed field: No, Unique: No, Required: No, Can always be edited: Yes, Visible: 3, Display on PDF: 1, Totalizable: No.
Please note that if I replace the
core/class/commonobject.class.php
of Dolibarr version 12 with the corresponding file of Dolibarr version 11, the extrafield content is fetched correctly. On the other hand, the oldcommonobject.class.php
file creates another problem in Dolibarr 12 when saving third parties, so I can't use the oldcommonobject.class.php
file as a temporary workaround.Actual behavior
When creating an invoice from a sales order the extrafield content is not fetched from the database, so, when saving the draft invoice, an empty string is inserted in the corresponding invoice extrafield. If when I create the invoice from the order, I add manually some content in the extrafield, the content is inserted correctly in the extrafield of the invoice.
The same thing happens when trying to create a shipment from an order with an extrafield: the extrafield's content is not fetched from the database.
Steps to reproduce the behavior
Add an extrafield to the sales orders, then add the same extrafield to the invoices. Then try to create an invoice from an order that has content in that extrafield. The new invoice will be created with an empty extrafield.
This problem deeply affects my activities. Please try to find a fix or a workaround.
The text was updated successfully, but these errors were encountered: