How can I get a specific form of a grid?

I’m studying to implement a new feature to solve the problems of detail of customizable items.

Called Item Properties, and allows you to define a set of specific properties is one:

  • Group Items
  • Item

The properties are additional extensions of fields like description, amount and more.

Eg
A customized product whose unit of measure is cubic meter, the film is based on three measurement properties (width, height and depth)

Or a product like a shirt where you can choose size and color, rather than remain an item for each combination of these properties is to determine the most useful properties of a single item, including facilitating the maintenance of price lists and records of items.

For now, my idea is that this only influences the descriptive and sales figures, sales orders, budgets and the like.

In another moment, think of how the properties can also modify the generation of price, adding 15%, 12% and reducing etc..

But for that I need to know how do I get a specific form of a grid.
For the data we locals[cdt][cdn] or doc for a DocField have wn.meta.get_docfield(cdt, 'fieldname', cdn)

Now, I saw nothing for forms, did not there would be a wn.ui.get_form(cdt, cdn)?

--

Maxwell Morais
Tecnologia da Informação
+55 11 3931-1412 Ramal 31

www.realizemodulados.com.br



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
Max,

This is a great idea and a need too. If you have detailed design docs, you can share them on the wiki and we can comment too. I am sure Aditya Duggal will have his own ideas ;)

Regarding the query, I am unable to understand. Grid forms are not permanent, they are built and destroyed on demand. There are certain methods in which you can load / bind triggers.

The standard way is to bind a trigger to cur_frm.cscript[fieldname] - this will be called for the main form and the grid form.

Is this what you are looking for?



On Friday, October 25, 2013 12:36:18 AM UTC+5:30, Maxwell wrote:

I’m studying to implement a new feature to solve the problems of detail of customizable items.

Called Item Properties, and allows you to define a set of specific properties is one:

  • Group Items
  • Item

The properties are additional extensions of fields like description, amount and more.

Eg
A customized product whose unit of measure is cubic meter, the film is based on three measurement properties (width, height and depth)

Or a product like a shirt where you can choose size and color, rather than remain an item for each combination of these properties is to determine the most useful properties of a single item, including facilitating the maintenance of price lists and records of items.

For now, my idea is that this only influences the descriptive and sales figures, sales orders, budgets and the like.

In another moment, think of how the properties can also modify the generation of price, adding 15%, 12% and reducing etc..

But for that I need to know how do I get a specific form of a grid.
For the data we locals[cdt][cdn] or doc for a DocField have wn.meta.get_docfield(cdt, 'fieldname', cdn)

Now, I saw nothing for forms, did not there would be a wn.ui.get_form(cdt, cdn)?

--

Maxwell Morais
Tecnologia da Informação
+55 11 3931-1412 Ramal 31

 www.realizemodulados.com.br



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
Hello Rushabh!


Is this what you are looking for?

No, this is not what I want to get!
It is precisely the form that is destroyed, from what I understand!

See, I have a 3 custom fields to the properties,

A Section a Text (hidden) to store the json, and HTML.


Necessarily what I would do is:
The moment in which the user selects an item from the sales order, I will add some custom fields in the HTML wrapper.

The problem I have is precisely that, due to the fact that the forms are not reserved in namespace, I have no way to get the wrapper element precisely what I want.

See, I can do by modifying the property "options" field html
Yes I can, but do not intend to do it because I will lose functionality "get_value" and "set_value" control created via "make_control"


We could not create a namespace for the forms?
I do not think it would take more resources than the actual instance of each form in memory, to respond to events, already occupies.





On Friday, October 25, 2013 12:36:18 AM UTC+5:30, Maxwell wrote:

I’m studying to implement a new feature to solve the problems of detail of customizable items.

Called Item Properties, and allows you to define a set of specific properties is one:

  • Group Items
  • Item

The properties are additional extensions of fields like description, amount and more.

Eg
A customized product whose unit of measure is cubic meter, the film is based on three measurement properties (width, height and depth)

Or a product like a shirt where you can choose size and color, rather than remain an item for each combination of these properties is to determine the most useful properties of a single item, including facilitating the maintenance of price lists and records of items.

For now, my idea is that this only influences the descriptive and sales figures, sales orders, budgets and the like.

In another moment, think of how the properties can also modify the generation of price, adding 15%, 12% and reducing etc..

But for that I need to know how do I get a specific form of a grid.
For the data we locals[cdt][cdn] or doc for a DocField have wn.meta.get_docfield(cdt, 'fieldname', cdn)

Now, I saw nothing for forms, did not there would be a wn.ui.get_form(cdt, cdn)?

--

Maxwell Morais
Tecnologia da Informação



Note:



If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.



    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




--

Maxwell Morais
Tecnologia da Informação
+55 11 3931-1412 Ramal 31

www.realizemodulados.com.br



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
body { font-family:'Helvetica'; font-size:12px}
Hi Max,

cur_frm.cscript.refresh/custom_refresh is called during each form refresh.

I think you should write a script that renders the content of HTML field in cur_frm.cscript.refresh/custom_refresh function.
Before rending the custom HTML, clear the HTML content.

Thanks,
Anand.

On Fri, 25 Oct 2013 12:06:15 +0530, Maxwell Morais <ma...@gmail.com> wrote:

Hello Rushabh!


Is this what you are looking for?

No, this is not what I want to get!
It is precisely the form that is destroyed, from what I understand!

See, I have a 3 custom fields to the properties,

A Section a Text (hidden) to store the json, and HTML.


Necessarily what I would do is:
The moment in which the user selects an item from the sales order, I will add some custom fields in the HTML wrapper.

The problem I have is precisely that, due to the fact that the forms are not reserved in namespace, I have no way to get the wrapper element precisely what I want.

See, I can do by modifying the property "options" field html
Yes I can, but do not intend to do it because I will lose functionality "get_value" and "set_value" control created via "make_control"


We could not create a namespace for the forms?
I do not think it would take more resources than the actual instance of each form in memory, to respond to events, already occupies.



 

 

On Friday, October 25, 2013 12:36:18 AM UTC+5:30, Maxwell wrote:

I’m studying to implement a new feature to solve the problems of detail of customizable items.

Called Item Properties, and allows you to define a set of specific properties is one:

  • Group Items
  • Item

The properties are additional extensions of fields like description, amount and more.

Eg
A customized product whose unit of measure is cubic meter, the film is based on three measurement properties (width, height and depth)

Or a product like a shirt where you can choose size and color, rather than remain an item for each combination of these properties is to determine the most useful properties of a single item, including facilitating the maintenance of price lists and records of items.

For now, my idea is that this only influences the descriptive and sales figures, sales orders, budgets and the like.

In another moment, think of how the properties can also modify the generation of price, adding 15%, 12% and reducing etc..

But for that I need to know how do I get a specific form of a grid.
For the data we locals[cdt][cdn] or doc for a DocField have wn.meta.get_docfield(cdt, 'fieldname', cdn)

Now, I saw nothing for forms, did not there would be a wn.ui.get_form(cdt, cdn)?

--

Maxwell Morais
Tecnologia da Informação



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




--

Maxwell Morais
Tecnologia da Informação
+55 11 3931-1412 Ramal 31

 www.realizemodulados.com.br



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.



--
Best,
Anand.



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.

2013/10/25 rushabh <rm...@gmail.com>
Max,

This is a great idea and a need too. If you have detailed design docs, you can share them on the wiki and we can comment too. I am sure Aditya Duggal will have his own ideas ;)


Rushabh, I don't have a detailed documentation of this, my ideia is focused on another question of Aditya, the Workflow Rules[1], I have studied a lot about business rules engines , and finite state machines , and some time ago I found a repository [2], which addresses both a very practical way .

I let the idea evolve to evaluate the possibility of implement - there ERPNext today wnframework knowing better , I see that a business rules engine , would come very handy in several points .

I chose the Items property because in my view, is the test case easier and useful to solve with Business Rules Engines , due to the fact each company has a set distindo of products , each with their specific and rules .

Finally , properties Items , for my design is just a minor case within a perspective of business rules . I also see that other things will be pushed along by it. That our conversation about basedos custom fields in the country , is still, precisely because there is a problem of business rules , related to the Brazilian state of location of the company . There are some rules laws very well documented , but no business rules , require excessive lines of code, I am trying to further minimize gap between code and configuration .

See the repository I mentioned , and tell me , with minor adjustments , some registrars functions and a good test case , it could expedite the implementation of some features ERPNext not ?




Regarding the query, I am unable to understand. Grid forms are not permanent, they are built and destroyed on demand. There are certain methods in which you can load / bind triggers.

The standard way is to bind a trigger to cur_frm.cscript[fieldname] - this will be called for the main form and the grid form.

Is this what you are looking for?



On Friday, October 25, 2013 12:36:18 AM UTC+5:30, Maxwell wrote:

I’m studying to implement a new feature to solve the problems of detail of customizable items.

Called Item Properties, and allows you to define a set of specific properties is one:

  • Group Items
  • Item

The properties are additional extensions of fields like description, amount and more.

Eg
A customized product whose unit of measure is cubic meter, the film is based on three measurement properties (width, height and depth)

Or a product like a shirt where you can choose size and color, rather than remain an item for each combination of these properties is to determine the most useful properties of a single item, including facilitating the maintenance of price lists and records of items.

For now, my idea is that this only influences the descriptive and sales figures, sales orders, budgets and the like.

In another moment, think of how the properties can also modify the generation of price, adding 15%, 12% and reducing etc..

But for that I need to know how do I get a specific form of a grid.
For the data we locals[cdt][cdn] or doc for a DocField have wn.meta.get_docfield(cdt, 'fieldname', cdn)

Now, I saw nothing for forms, did not there would be a wn.ui.get_form(cdt, cdn)?

--

Maxwell Morais
Tecnologia da Informação



Note:



If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.



    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




--

Maxwell Morais
Tecnologia da Informação
+55 11 3931-1412 Ramal 31

www.realizemodulados.com.br



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
Hello, all!
Just to document, I could do what I wanted, in another way, and after the code finished, the function refresh_field showed me the way of what I wanted to do before, see: https://github.com/webnotes/wnframework/blob/2e95247b5f14025fa771ff75824e0d050fbb93b4/public/js/legacy/clientscriptAPI.js#L67


2013/10/27 Maxwell Morais <ma...@gmail.com>

2013/10/25 rushabh <rm...@gmail.com>
Max,

This is a great idea and a need too. If you have detailed design docs, you can share them on the wiki and we can comment too. I am sure Aditya Duggal will have his own ideas ;)


Rushabh, I don't have a detailed documentation of this, my ideia is focused on another question of Aditya, the Workflow Rules[1], I have studied a lot about business rules engines , and finite state machines , and some time ago I found a repository [2], which addresses both a very practical way .

I let the idea evolve to evaluate the possibility of implement - there ERPNext today wnframework knowing better , I see that a business rules engine , would come very handy in several points .

I chose the Items property because in my view, is the test case easier and useful to solve with Business Rules Engines , due to the fact each company has a set distindo of products , each with their specific and rules .

Finally , properties Items , for my design is just a minor case within a perspective of business rules . I also see that other things will be pushed along by it. That our conversation about basedos custom fields in the country , is still, precisely because there is a problem of business rules , related to the Brazilian state of location of the company . There are some rules laws very well documented , but no business rules , require excessive lines of code, I am trying to further minimize gap between code and configuration .

See the repository I mentioned , and tell me , with minor adjustments , some registrars functions and a good test case , it could expedite the implementation of some features ERPNext not ?




Regarding the query, I am unable to understand. Grid forms are not permanent, they are built and destroyed on demand. There are certain methods in which you can load / bind triggers.

The standard way is to bind a trigger to cur_frm.cscript[fieldname] - this will be called for the main form and the grid form.

Is this what you are looking for?



On Friday, October 25, 2013 12:36:18 AM UTC+5:30, Maxwell wrote:

I’m studying to implement a new feature to solve the problems of detail of customizable items.

Called Item Properties, and allows you to define a set of specific properties is one:

  • Group Items
  • Item

The properties are additional extensions of fields like description, amount and more.

Eg
A customized product whose unit of measure is cubic meter, the film is based on three measurement properties (width, height and depth)

Or a product like a shirt where you can choose size and color, rather than remain an item for each combination of these properties is to determine the most useful properties of a single item, including facilitating the maintenance of price lists and records of items.

For now, my idea is that this only influences the descriptive and sales figures, sales orders, budgets and the like.

In another moment, think of how the properties can also modify the generation of price, adding 15%, 12% and reducing etc..

But for that I need to know how do I get a specific form of a grid.
For the data we locals[cdt][cdn] or doc for a DocField have wn.meta.get_docfield(cdt, 'fieldname', cdn)

Now, I saw nothing for forms, did not there would be a wn.ui.get_form(cdt, cdn)?

--

Maxwell Morais
Tecnologia da Informação



Note:



If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.



    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.






Maxwell Morais

Tecnologia da Informação




--

Maxwell Morais
Tecnologia da Informação
+55 11 3931-1412 Ramal 31

www.realizemodulados.com.br



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.