[ADD] pms: wizard massive changes on availability plans and pricelists (#28)

* [IMP] pms: wizard massive changes on availability plans

* [TEST] add creation rule based on weeek days

* [REF] pms: model av. plan, rule_ids & inv. name

* [IMP] pms: wizard called from pricelist & availability plans consistently

* [IMP] pms: wizard massive changes on pricelists

* [FIX] pms: fix creation pricelist items

* [FIX] pms: fix timezone on create pricelist items

* [TEST] pms: fix time zone issues in testing
This commit is contained in:
Miguel Padin
2020-12-22 10:53:13 +01:00
committed by GitHub
parent 977feac1e6
commit 5f7bd6b540
24 changed files with 1218 additions and 79 deletions

View File

@@ -22,8 +22,8 @@ class ProductPricelist(models.Model):
[("daily", "Daily Plan")], string="Pricelist Type", default="daily"
)
availability_id = fields.Many2one(
comodel_name="pms.room.type.availability",
availability_plan_id = fields.Many2one(
comodel_name="pms.room.type.availability.plan",
string="Availability Plan",
ondelete="restrict",
)
@@ -79,3 +79,19 @@ class ProductPricelist(models.Model):
)
)
return items
# Action methods
def open_massive_changes_wizard(self):
if self.ensure_one():
return {
"view_type": "form",
"view_mode": "form",
"name": "Massive changes on Pricelist: " + self.name,
"res_model": "pms.massive.changes.wizard",
"target": "new",
"type": "ir.actions.act_window",
"context": {
"pricelist_id": self.id,
},
}