Skip to content
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

NEW: Automatically fill matching extra fields of object on line creation. #27240

Merged
merged 2 commits into from
Feb 12, 2024

Conversation

ionutfinta
Copy link
Contributor

NEW|New [Automatically fill matching extra fields of object on line creation.]

This modification allows to automatically fill the matching extra field of an object (product/service) when both the object and the form (for example, when adding the object to a propale or invoice) have a same-named extra-field.

This change allows to automatically fill the matching extra fields in a form when adding an object (product/service).
@eldy
Copy link
Member

eldy commented Dec 28, 2023

Can you provide an example with a screenshot of what the PR do ?

@eldy eldy added PR waiting more user feedbacks We are waiting feedback of someone or more testers to validate this PR Discussion Some questions or discussions are opened and wait answers of author or other people to be processed and removed PR waiting more user feedbacks We are waiting feedback of someone or more testers to validate this PR labels Dec 28, 2023
@ionutfinta
Copy link
Contributor Author

Ok, let's say you have a color attribute on a service:

image

... and you have the same attribute in your proposal:

image

Then, when you add the service to your proposal, it will automatically fill the attributes that have the same name on both your product/service and proposal:
image

@eldy eldy changed the title New: Automatically fill matching extra fields of object on line creation. NEW: Automatically fill matching extra fields of object on line creation. Jan 3, 2024
@eldy eldy added Pending analysis of PR PR needs discussion with other dev. PR set to pending status. May be debated during a devcamp. and removed Discussion Some questions or discussions are opened and wait answers of author or other people to be processed labels Jan 3, 2024
@eldy eldy merged commit e89dd3b into Dolibarr:develop Feb 12, 2024
3 checks passed
@BlueGarm
Copy link
Contributor

BlueGarm commented Aug 1, 2024

Hello,
Is there anything I can do to make it work?
I installed a test version with the V20 but for me it doesn't work, but maybe I missed a parameter.
Thanks

@ionutfinta ionutfinta deleted the patch-1 branch August 3, 2024 10:24
@ionutfinta
Copy link
Contributor Author

Hello @BlueGarm

I just tested it on a fresh install of the V20 and it works.

There is no parameter to set, you just have to define the same attribute for the object (Product/Service) and in the propale lines attributes.

In my example, I created a custom attribute "color" on the service and the same attribute in the Propale lines, then the value of the field is automatically copied on add.

For fields of type "List selection", we don't see the selected item directly, but the value is still copied and you can see it when validating the line or when you try to select a value.
I did not test for fields of type check boxes or radio buttons, but I don't think it will work for these.

Check your javascript console for eventual errors and give us more details regarding your problem if you need further assistance.

@BlueGarm
Copy link
Contributor

BlueGarm commented Aug 3, 2024

Thanks, i do some supplementary tries and yes it's working but not with suppliers orders.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pending analysis of PR PR needs discussion with other dev. PR set to pending status. May be debated during a devcamp.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants