跳至內容
選單
此問題已被標幟
4585 瀏覽次數

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'),

}

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
11月 16
3600
2
4月 24
1346
1
10月 24
25801
1
9月 19
6596
5
7月 19
10828