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

when selecting object a how to increment its integer field

By
layal abishalhla
on 4/4/14, 9:19 AM 642 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 ??

0
Weste
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.

Weste
on 4/4/14, 12:53 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

0 follower(s)

Stats

Asked: 4/4/14, 9:19 AM
Seen: 642 times
Last updated: 3/16/15, 8:10 AM