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

[Variant]: Copy fields from Template at the time of Saving a Variant as well #4253

Closed
adityaduggal opened this issue Oct 29, 2015 · 10 comments
Closed
Assignees

Comments

@adityaduggal
Copy link
Contributor

Currently only fields are copied from the template when a new Variant is created but when we are making changes to the variant then the fields are not getting copied over to the variant.

This has been discussed at https://discuss.erpnext.com/t/how-to-copy-values-from-template-to-variant/8093/

@adityaduggal adityaduggal changed the title [Variant]: Copy fields from Template at Saving a template [Variant]: Copy fields from Template at the time of Saving a Variant as well Oct 29, 2015
@neilLasrado
Copy link
Contributor

@adityaduggal I feel a better design would be to not allow values to be changed on the variant form. Let me know your inputs on this.

@adityaduggal
Copy link
Contributor Author

Sure that would be much better since then the user knows that those values which he/she is trying to change needs to be changed in the Template or if they want the values to be different across variants then would make that field as no_copy

I think this is much better rather than just copying from template and keeping the user perplexed as what does he needs to do to change the field in the variant.

@adityaduggal
Copy link
Contributor Author

@neilLasrado Any update on this issue?

@rmehta
Copy link
Member

rmehta commented Jan 9, 2017

I think this is already done. Can someone check?

@rmehta rmehta added the to-validate Old issues pending validation label Jan 9, 2017
@adityaduggal
Copy link
Contributor Author

I don't think this is implemented, I just checked. Checked as below:

  1. Create a template TEMP and set the standard selling rate = 100
  2. Now create Item A under this template. the standard selling rate is automatically set to 100

Now the problem is that when I open Item A again and change the standard selling rate to 50 and since this field is NOT set to no copy ideally the template should enforce that the standard selling rate should be 100 instead of 50 which we have changed later.

I hope I have clearly stated the problem.

Basically what I am saying that if a field is not set to NO COPY then it should be enforced on the variants and not just COPY.

@shachiTakalkar
Copy link
Contributor

This is done. If we make any changes in the Template then the Variants are updated on saving the Template.

@shachiTakalkar
Copy link
Contributor

@adityaduggal @rmehta I can replicate the issue in my test account as well.

@adityaduggal adityaduggal added stock bug and removed to-validate Old issues pending validation labels May 2, 2017
@rmehta rmehta self-assigned this May 15, 2017
rmehta added a commit to rmehta/erpnext that referenced this issue May 15, 2017
@rmehta rmehta closed this as completed May 15, 2017
nabinhait pushed a commit that referenced this issue May 16, 2017
@rmehta
Copy link
Member

rmehta commented May 18, 2017

@adityaduggal reverting this. Most users it seems want variant attributes copy-able!

@adityaduggal
Copy link
Contributor Author

I am unable to understand what it means that users want the variant attributes as copy-able...can you explain a bit more. What I see fro the code changes that if a field is not marked as NO COPY then the field in the variant would be un-editable

The only problem I see that there is no way a user can control which fields are NO COPY and which fields are NOT NO COPY since that option is not in the customize form view.

If the customize form view has the option to change the fields from COPY to NO COPY or vice-versa then it would be a easier for users to customize the things at their end.

@rmehta
Copy link
Member

rmehta commented May 19, 2017

Allowing no-copy is a bad option. It causes lots of problems when reference fields are copied over. Maybe there needs to be another option. For now leaving it as it is.

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

No branches or pull requests

4 participants