[IMP]pms: journal filter manual payment allowed

This commit is contained in:
Darío Lodeiros
2021-10-12 19:59:39 +02:00
parent 7d2b471503
commit 00cef25ec1
3 changed files with 6 additions and 0 deletions

View File

@@ -19,3 +19,7 @@ class AccountJournal(models.Model):
help="The company for Account Jouarnal", help="The company for Account Jouarnal",
check_pms_properties=True, check_pms_properties=True,
) )
allowed_pms_payments = fields.Boolean(
string="For manual payments",
help="Use to pay for reservations",
)

View File

@@ -408,6 +408,7 @@ class PmsProperty(models.Model):
self.ensure_one() self.ensure_one()
payment_methods = self.env["account.journal"].search( payment_methods = self.env["account.journal"].search(
[ [
("allowed_pms_payments", "=", True),
"&", "&",
("type", "in", ["cash", "bank"]), ("type", "in", ["cash", "bank"]),
"|", "|",

View File

@@ -6,6 +6,7 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//field[@name='company_id']" position="after"> <xpath expr="//field[@name='company_id']" position="after">
<field name="pms_property_ids" widget="many2many_tags" /> <field name="pms_property_ids" widget="many2many_tags" />
<field name="allowed_pms_payments" />
</xpath> </xpath>
</field> </field>
</record> </record>