跳至内容
菜单
此问题已终结
1 回复
3386 查看

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 ??

形象
丢弃
最佳答案

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

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