JayVora-SerpentCS / OdooHotelManagementSystem

Hotel Management System based on Odoo
http://www.serpentcs.com
216 stars 247 forks source link

reservation Rooms don't use price list #110

Closed dceevp closed 7 years ago

dceevp commented 7 years ago

Hi,

I have a problem with Odoo 9.0 and Hotel management System V9.0. I have a price list for each room category, but on reservation and create folio from reservation, the system only use de base price instead the price in price list.

Could you help me where i can modified the code to resolve this?

thanks

I add some images

Pricelist (set room to $70, base price for room 35 000 local currency)

pricelist

Info on reservation room

reservation

folio1

folio2

Nice App :D

dceevp commented 7 years ago

hi.... i look arround others files and i think so maybe like this on file hotel_reservation.py line 414

'price_unit': self.pool.get('product.pricelist').price_get(self._cr, self._uid, [reservation.pricelist_id], r.product_id.id, 1, reservation.partner_id)[reservation.pricelist_id],

But, i get the following error

File "/odoo/odoo-server/openerp/sql_db.py", line 220, in execute res = self._obj.execute(query, params) ValueError: "can't adapt type 'product.pricelist'" while evaluating u'_create_folio()'

could anyone help me?

JayVora-SerpentCS commented 7 years ago

@dceevp We will check this today itself and shall respond back.

dceevp commented 7 years ago

Hi, Thanks for reply

I found a solution, i don't know if this is the best, but it's work for me. On hotel_reservation.py I add the following code, Line 411,

captura

Now, the reservation room use my pricelist

Pricelist 1

reservation line with local amount 2

hotel folio with price fixed 3

Folio details 4

Sales and invoice work fine.