Odoo Help


how to use create,write,env methods..?and what is the use of vals

Rahul Nimgade
on 8/9/16, 7:36 AM 505 views

hello all

i am new in odoo v8, i am trying to create one boolean field so when it checked make invoice for customer if not then dont

so how can i do this,when i research i understand   use write,read methods,,,,but how can i achieve this i do not understand please anybody help me

from openerp import api, fields, models, _

class create_invoice_customer(models.Model):


_description ="create invoice for customer"


def make_invoice1(self):

res=super(sale_order, self).create(vals)



return res

make1 = fields.Boolean(compute='make_invoice1',string="Make Invoice")

i refer these links:



Thank you.....!

you are on the wrong way...

I really suggest you to take a look in https://www.odoo.com/documentation/9.0/howtos/backend.html#build-an-odoo-module

Why do you want a Boolean to execute a code ... probably a button will be better ?

You are creating a sale order and an invoice with the same value an in a compute function ... no sense.

Jérémy Kersten (jke)
on 8/9/16, 7:54 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: 8/9/16, 7:36 AM
Seen: 505 times
Last updated: 8/9/16, 7:45 AM