Odoo Help


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.


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

Rahul Nimgade
on 8/9/16, 7:36 AM 93 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

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)


Asked: 8/9/16, 7:36 AM
Seen: 93 times
Last updated: 8/9/16, 7:45 AM