Odoo Help


button edit is not working

on 10/20/14, 3:42 AM 461 views

Button edit is not working .

my code :

def write(self, cr, uid,ids, vals, context=None):  
        for record in self.browse(cr, uid, ids,context):
            vals['p_achat_ht'] = record.t_c*record.prix_d*(1+record.fret_p)
            vals['p_achat_ttc'] = record.t_c*record.prix_d*(1+record.tva_p/100)*(1+record.fret_p/100)
            vals['p_achat_ht_pgd'] = record.p_vente_ht
            vals['p_vente_ttc'] = record.p_vente_ht*(1+record.tva_p/100)
            vals['p_achat_ttcd'] = record.p_vente_ht*(1+record.tva_p/100)
            vals['p_vente_ttcd'] = record.p_vente_htd*(1+record.tva_p/100)
        return super(product_product, self).write(cr, uid,ids,vals,context=context)


Ludo - 21South

--Ludo - 21South--
| 2 2 5
Zwijndrecht, Netherlands
--Ludo - 21South--


Ludo - 21South
On 10/20/14, 5:32 AM

How are we supposed to help you with this? There is no error code, no stack trace, no reason. Just a bit of code and "not working".

Explain at least a little bit more and/or post a stack trace. Also, mention what you expected it to do.

Hi Ludo ,my problem is to store field readonly in database with method onchange ,so i use method write ,the field is stored but when i use the button edit to modify my record the button is not working. thanks

on 10/20/14, 6:03 AM

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

1 follower(s)


Asked: 10/20/14, 3:42 AM
Seen: 461 times
Last updated: 3/16/15, 8:10 AM