mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[ADD]multi_pms_properties (#66)
* [WIP]pms: models check_pms_property * [WIP][IMP+REF] multi_pms_properties: refactor and added test skeleton * [FIX] inherit create models * [ADD] room multiproperty check * [ADD] room multiproperty check * [IMP] Multiproperty checks in pms models * [IMP] Fix Multiproperty checks in pms models * [IMP] Add multiproperty domain in multi_pms_properties module * [IMP] Fix multiproperty checks in pms tests * [IMP] Fix multiproperty checks logic * [IMP] Auto Domains * [IMP] availability property results, domain preferred_room_id * [IMP] model domain properties * [ADD] pms multiproperty depends * [IMP] models and views multiproperty checks * [FIX] Multiple rebase multiproperty fixes * [ADD] Readme * [ADD] Company - multiproperty checks * [ADD] travis server wide modules multiproperty * [FIX] travis conf load * [FIX] travis conf load2 * [FIX] travis conf load2 Co-authored-by: Eric Antones <eantones@nuobit.com> Co-authored-by: Sara Lago <saralago126@gmail.com>
This commit is contained in:
@@ -40,6 +40,21 @@ class ResPartner(models.Model):
|
||||
string="Invoice Agency",
|
||||
help="Indicates if agency invoices partner",
|
||||
)
|
||||
pms_property_ids = fields.Many2many(
|
||||
string="Properties",
|
||||
help="Properties with access to the element;"
|
||||
" if not set, all properties can access",
|
||||
required=False,
|
||||
comodel_name="pms.property",
|
||||
relation="res_partner_pms_property_rel",
|
||||
column1="res_partner_id",
|
||||
column2="pms_property_id",
|
||||
ondelete="restrict",
|
||||
check_pms_properties=True,
|
||||
)
|
||||
company_id = fields.Many2one(
|
||||
check_pms_properties=True,
|
||||
)
|
||||
|
||||
def _compute_reservations_count(self):
|
||||
# TODO: recuperar las reservas de los folios del partner
|
||||
|
||||
Reference in New Issue
Block a user