In the Quote entity, there is a "Items" section, there is "pencil" image that when click, I can add another item. After clicking the "+" sign to add another item, I can select a Product entity. What I want to be able to do, is select any other entity when I click the "up" arrow. For example, if I want to be able to add something from the Task entity from the "up" arrow in the invoice, I able to select Task entity to the left, and columns of task are visible to the right the same way the Product is. I don't want to delete ability to select Product from the Quote entity->Items. I want to select any entity. How would I go about doing that?
Announcement
Collapse
No announcement yet.
Quote entity->Items. Select any entity from the QuoteItem->"up" arrow interface
Collapse
X
-
yuri What source code (file) should I be looking at to cutomize? Would very much appreciate your response.Last edited by worldmiros; 01-11-2016, 03:33 PM.
Comment
-
Based on further reading files in the espocrm directory, I may have to create several files(task.json, taskbrand.json, taskcategory.json). Add some coding to files such as, name.js, edit.tpl, details.tpl, and select-record.tpl to do what I want it to do. Am I in the ballpark? And in the product.json, productbrand.json, and productcategory.json files, what isCode:"list": "Advanced: Product.List" "controller": "Controllers.Record"
Last edited by worldmiros; 01-11-2016, 10:29 PM.
Comment
-
yuri What files are responsible for the interface after clicking <span>glyphicon glyphicon-arrow-up</span> in the Quote entity->quoteitems. You said I need to look at the source code to customize it, but not sure which files are responsible for the interface to get an idea of what I have to do.
Comment
-
yuri I create Task.json file in the scope directory for the interface to display Tasks' data. Then in name.js, I change the scope to 'Task'. Tasks' data was visible and was able to select after I cleared cached. Listing different entities on the interface is for another day. Right now, I just want to list Tasks' data in the interface to add item. In name.js,
Code:[COLOR=#000080][B]var [/B][/COLOR][COLOR=#458383]viewName [/COLOR]= [COLOR=#000080][B]this[/B][/COLOR].[COLOR=#7a7a43]getMetadata[/COLOR]().[COLOR=#7a7a43]get[/COLOR]([COLOR=#008000][B]'clientDefs.Product.modalViews.select'[/B][/COLOR]) || [COLOR=#008000][B]'Modals.SelectCategoryTreeRecords'[/B][/COLOR][COLOR=#cc7832];[/COLOR]
Code:[COLOR=#660e7a][B]"modalViews"[/B][/COLOR][COLOR=#cc7832]: [/COLOR]{ [COLOR=#660e7a][B]"select"[/B][/COLOR][COLOR=#cc7832]: [/COLOR][COLOR=#008000][B]"Advanced:Task.Modals.SelectRecords" [/B][/COLOR]}[COLOR=#cc7832],[/COLOR]
Last edited by worldmiros; 01-15-2016, 09:26 PM.
Comment
-
yuri I manage to set the quantity to tot_hours(task scope/entity) in name.js file for quoteitem. I have self created field called, "hourlyRate" in the matters entity, and want to set that value to listprice and unitprice. The relationship with matters to task, is parent-to-child. To get it, would it be?
Code:var obj = this.model.parent.get('hourlyRate');
Comment
-
yuri In matters entity, it's parent-to-child for matters => task entities. When I change the scope in name.js, I was able assign quantity to a created field in task entity called, tot_hours. I want to be able to retrieve hourlyRate in the matters, and due to the parent-to-child relationship with matters and task, I thought it will be possible to retrieve the field from matters entity some way in name.js file. Just don't how it's achievable.
Comment
-
You need to load parent model
PHP Code:this.getModelFactory().get(parentType, function (parentModel) {
parentModel.id = parentId;
this.listenToOnce(parentModel, 'sync', function () {
var someFieldValue = parentModel.get('someField');
this.model.set('someField', someFieldValue);
}, this);
parentModel.fetch();
}, this);
Comment
-
I've been searching how to create a button via the forum, so I can add one to perform an action during the scope being viewed in QuoteItems. To do, is it the code below?
Code:this.menu.buttons.push({ 'label':'Select Scope', 'action':'SelectScope', 'acl':'read' });
Last edited by worldmiros; 01-28-2016, 04:44 PM.
Comment
Comment