mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[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:
@@ -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,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user