تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
4558 أدوات العرض

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
نوفمبر 16
3575
2
أبريل 24
1326
1
أكتوبر 24
25724
1
سبتمبر 19
6584
5
يوليو 19
10811