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.

7

How to print one2many field using aeroo report in openerp7?

By
Remya
on 12/20/13, 6:50 AM 1,516 views

I have a one2many field in res.partner. How i code the one2many field in aeroo report?

Any one knows , how to print one2many field in aeroo report?

please show an example

Francisco Castro
on 2/27/14, 1:56 PM
7

Remya

--Remya--
5813
| 7 8 8
Thiruvananthapuram, India
--Remya--

Working as an Senior ODOO developer. http://in.linkedin.com/pub/remya-r/69/a23/298

Remya
On 12/21/13, 2:50 AM

I had find out a solution for this.

Code is <for each="line in o.one2many field in res.partner table">

<line.fieldname in="" one2many="" field.columnname="">

</for>

1
Francisco Castro
On 2/27/14, 7:54 AM

I cand did it.. im new at this pls explain wih this example:

_name = 'gs.pet'

_columns= {

          'pet_id': fields.char('Código', size=20, required='True'),
           'name': fields.char('Nome', size=60, required='True'),
           'owner_id':fields.many2one('gs.owner','ID_owner'),
           'register_data': fields.date('Data de Registo', required='True'),
           'gender':fields.selection([(1,'Macho'),(2,'Femea')],'Gender',required='True'),
           'born_date':fields.date('Data de Nascimento',required='True'),
           'imagemPet': fields.binary('Imagem'),
            'active': fields.boolean('Activo')
           }

_name = 'gs.owner'

_columns= {

           'owner_id': fields.one2many('gs.pet', 'owner_id','Pets'),
           'name': fields.char('Name', size=60, required='True'),
           'street':fields.char('Adress',size=60, required='True'),
           'phone':fields.char('Phone',size=15, required='True'),
           'imagemOwner': fields.binary('Imagem'),
           'active': fields.boolean('Activo')
           }

I want to list all the pets of the owner I dont know what can I do

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

1 follower(s)

Stats

Asked: 12/20/13, 6:50 AM
Seen: 1516 times
Last updated: 3/16/15, 8:10 AM