Odoo Help


How to invoice restaurant food?

Arjun Khode
on 5/28/15, 7:24 AM 753 views

I have a restaurant management module in which food orders are taken.

I have created a red button called bill_button and it is of type object.

Now I want to add functionality to that button in python in which, the value of amount_total field should get invoiced. I want an invoice to be created of that value.

Currently, customer name is not taken in my restaurant module. Just the table number and food items order.

Can someone suggest how I can program the creation of the invoice through the bill button?

Here's some of my code that I wrote:

class hotel_restaurant_order(osv.Model):

_columns = {

 'order_list':fields.one2many('hotel.restaurant.order.list', 'o_list', 'Order List'),

'tax': fields.float('Tax (%) '),

'table_no':fields.many2many('hotel.restaurant.tables', 'temp_table2', 'table_no', 'name', 'Table Number'),

'amount_subtotal': fields.function(_sub_total, method=True, string='Subtotal'),

'amount_total':fields.function(_total, method=True, string='Total'),


def bill_button(self, cr, uid, ids, part):


return total

Please help me?

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: 5/28/15, 7:24 AM
Seen: 753 times
Last updated: 5/28/15, 7:24 AM