Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
4579 Ansichten

Hi, I am making a hotel management module.

In this module I have a menu that contains all the expenditures like meals, internet, room service, etc listed out along with their costs.

Also, I have defined rooms as products, so sale price of room will be the rent.

Now I want to create a 'checkout' button which will add (sale price of room*no. of days) with the sum of expenditures from expenditure menu.

Can someone tell me how to add these values and how to get the sum of expenditures?


Here is my py code:


class expenditure_records(osv.Model):

_name="expenditure.records"

_columns={

'name':fields.char('Expense name'),

'cost':fields.float('Expenditure cost'),

'expense_id':fields.many2one('expenditure','Expense ID'),

}

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Nov. 16
3596
2
Apr. 24
1345
1
Okt. 24
25790
1
Sept. 19
6595
5
Juli 19
10826