mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[WIP] Synchronize manually from a remote node
This commit is contained in:
@@ -119,6 +119,7 @@ class HotelNodeUser(models.Model):
|
||||
:param dict vals: a dictionary of fields to update and the value to set on them.
|
||||
:raise: ValidationError
|
||||
"""
|
||||
|
||||
for rec in self:
|
||||
if 'node_id' in vals and vals['node_id'] != rec.node_id.id:
|
||||
msg = _("Changing a user between nodes is not allowed. Please create a new user instead.")
|
||||
@@ -143,6 +144,9 @@ class HotelNodeUser(models.Model):
|
||||
|
||||
remote_vals = {}
|
||||
|
||||
if 'login' in vals:
|
||||
remote_vals.update({'login': vals['login']})
|
||||
|
||||
if 'active' in vals:
|
||||
remote_vals.update({'active': vals['active']})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user