Odoo Help


Help load data listview when click button

lam a bao
on 12/4/13, 11:52 PM 713 views

hi everyone :

 class cvs_quotations(osv.osv):

  _name = "cvs.quotations"

 def _calc_seller(self, cr, uid, ids, fields, arg, context=None):

     result = {}

    for product in self.browse(cr, uid, ids, context=context):


          result[product.id] = {
                'codeproduct': oj_data[0]['codeproduct'],
                'weight': oj_data[0]['weight'],
                 'quantity': oj_data[0]['quantity'],
                'prices': oj_data[0]['prices'],
               'position': oj_data[0]['position']

return result

 _columns = {
     "saleordercode": fields.char("Sale order Code", translate=True),
    "payment_ids":fields.function(_calc_seller,relation='cvs.quotations.cutproduct', type="many2many",string='Payments'),


    class cvs_quotations_cutproduct(osv.osv):
                    "codeproduct":fields.char("Mã Vật Tư",translate=True),
                   "weight":fields.char("Kích Thước",translate=True),
                  "quantity":fields.integer("Số Lượng",translate=True),
                    "prices":fields.float("Giá Vật Tư",translate=True),
                 "position":fields.char("Vị Trí",translate=True),
               "saleordercode":fields.char("Code Order",translate=True),

when I click button,listview will load data

Can you help me ?

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 platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 12/4/13, 11:52 PM
Seen: 713 times
Last updated: 3/16/15, 8:10 AM