[WIP] Channel Connector: Import Pricelist

This commit is contained in:
QS5ELkMu
2018-11-06 00:56:22 +01:00
parent 19127e3091
commit 52ff989dc4
20 changed files with 426 additions and 102 deletions

View File

@@ -25,10 +25,10 @@ class IrDefault(models.Model):
fixed_price = pitem.fixed_price
room_type = room_type_obj.search([
('product_id.product_tmpl_id', '=', product_tmpl_id),
('date_start', '>=', fields.Date.today())
], limit=1)
room_pr_cached_obj.create({
'room_type_id': room_type.id,
'date': date_start,
'price': fixed_price,
})
if room_type:
room_pr_cached_obj.create({
'room_id': room_type.id,
'date': date_start,
'price': fixed_price,
})