mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP]pms: add options property autotinvoice
This commit is contained in:
@@ -142,6 +142,35 @@ class PmsProperty(models.Model):
|
|||||||
is_modified_auto_mail = fields.Boolean(string="Auto Send Modification Mail")
|
is_modified_auto_mail = fields.Boolean(string="Auto Send Modification Mail")
|
||||||
is_canceled_auto_mail = fields.Boolean(string="Auto Send Cancellation Mail")
|
is_canceled_auto_mail = fields.Boolean(string="Auto Send Cancellation Mail")
|
||||||
|
|
||||||
|
default_invoicing_policy = fields.Selection(
|
||||||
|
string="Invoicing Policy",
|
||||||
|
selection=[
|
||||||
|
("manual", "Manual"),
|
||||||
|
("checkout", "Checkout"),
|
||||||
|
],
|
||||||
|
default="manual",
|
||||||
|
)
|
||||||
|
|
||||||
|
journal_simplified_invoice_id = fields.Many2one(
|
||||||
|
string="Simplified Invoice Journal",
|
||||||
|
comodel_name="account.journal",
|
||||||
|
domain=[
|
||||||
|
("type", "=", "sale"),
|
||||||
|
],
|
||||||
|
help="Journal used to create the simplified invoice",
|
||||||
|
check_company=True,
|
||||||
|
check_pms_properties=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
journal_normal_invoice_id = fields.Many2one(
|
||||||
|
string="Normal Invoice Journal",
|
||||||
|
comodel_name="account.journal",
|
||||||
|
domain=[("type", "=", "sale")],
|
||||||
|
help="Journal used to create the normal invoice",
|
||||||
|
check_company=True,
|
||||||
|
check_pms_properties=True,
|
||||||
|
)
|
||||||
|
|
||||||
@api.depends_context(
|
@api.depends_context(
|
||||||
"checkin",
|
"checkin",
|
||||||
"checkout",
|
"checkout",
|
||||||
|
|||||||
@@ -85,6 +85,27 @@
|
|||||||
<field name="room_ids" />
|
<field name="room_ids" />
|
||||||
</group>
|
</group>
|
||||||
</page>
|
</page>
|
||||||
|
<page string="Invoicing" name="property_invoicing">
|
||||||
|
<group>
|
||||||
|
<field name="default_invoicing_policy" />
|
||||||
|
<field
|
||||||
|
name="journal_simplified_invoice_id"
|
||||||
|
attrs="{'required': [('default_invoicing_policy', '!=', 'manual')]}"
|
||||||
|
domain="[
|
||||||
|
('type', '=', 'sale'),
|
||||||
|
('company_id','=',company_id),
|
||||||
|
]"
|
||||||
|
/>
|
||||||
|
<field
|
||||||
|
name="journal_normal_invoice_id"
|
||||||
|
attrs="{'required': [('default_invoicing_policy', '!=', 'manual')]}"
|
||||||
|
domain="[
|
||||||
|
('type', '=', 'sale'),
|
||||||
|
('company_id','=',company_id),
|
||||||
|
]"
|
||||||
|
/>
|
||||||
|
</group>
|
||||||
|
</page>
|
||||||
<page string="Email Configuration">
|
<page string="Email Configuration">
|
||||||
<group>
|
<group>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|||||||
Reference in New Issue
Block a user