Odoo Help


when selecting object a how to increment its integer field

layal abishalhla
on 4/4/14, 9:19 AM 1,026 views

i have 2 classes in my module ;

class A:

'b_id' : fields.many2one('B'),

class B :

_rec_name = "'name'

'name' : fields.char('name'),

'counter': fields.integer('counter')

what i need is that whenever i select an object of a (from b_id) , to increment its counter.

any help please ??

On 4/4/14, 10:14 AM

you mean you want to know how many A objects are linked to your B object?

i want to know each object of A is how many times linked to B ; example: a1--->2 times, a2--->4 times,....

layal abishalhla
on 4/4/14, 11:17 AM

I don't understand. With your current classes, A can only be linked one time as the b_id is many2one.

on 4/4/14, 12:53 PM

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: 4/4/14, 9:19 AM
Seen: 1026 times
Last updated: 3/16/15, 8:10 AM