Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

What is the name of the javascript object used in sum attribute in xml?

By
Abegail Sanchez
on 8/17/14, 11:13 PM 907 views

Can someone point to me what is the name of the javascript file that calculate the sum, for  example total quantity or total amount of products

0

Prakash

--Prakash--
3173
| 5 4 7
Bikaner, India
--Prakash--

OpenERP Devloper at SunARC Technology

Prakash
On 8/18/14, 1:38 AM

Aggregate Function Sum, Min, Max, Avg define in xml File.

Example,

  <field name="price_subtotal" sum="Total"/>

The below Java Scipt File used to calculate the Aggregate Fuction.

File Name:   \addons\web\static\src\js\view_list.js

Line No: 716  compute_aggregates: function (records) {

                       ------------------
                     }

 

0
Abegail Sanchez
On 8/18/14, 3:34 AM

Do you know how to override that to show in separate field the total or just to render a larger view? Example to its parent form assuming its one2many field. Not on the bottom of that column.

where do you want to shows?.. Default it shows In List view. if you want to shows in form view as separate field then create functional field and calculate sum of amount.

Prakash
on 8/18/14, 3:41 AM

I've already created that way but my client wants it realtime just like what happening when you add an item to the list view it automatically calculate the total without any actions trigger. In fact it stores on the browser, Do you know to manipulate openerp base module not web module thru javascript? I cant manipulate only the modules that uses the templates(qweb template) tag and not the openerp tag

Abegail Sanchez
on 8/18/14, 8:15 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 8/17/14, 11:13 PM
Seen: 907 times
Last updated: 3/16/15, 8:10 AM