Browse Source

publish muk_web_client_refresh - 12.0

pull/115/head
MuK IT GmbH 5 years ago
parent
commit
b50d4ea32d
  1. 2
      muk_web_client_refresh/__manifest__.py
  2. 17
      muk_web_client_refresh/models/ir_actions.py

2
muk_web_client_refresh/__manifest__.py

@ -23,7 +23,7 @@
{
"name": "MuK Web Refresh",
"summary": """Web Client Refresh""",
"version": "12.0.3.0.0",
"version": "12.0.3.0.1",
"category": "Extra Tools",
"license": "AGPL-3",
"website": "http://www.mukit.at",

17
muk_web_client_refresh/models/ir_actions.py

@ -43,11 +43,12 @@ class ServerActions(models.Model):
@api.model
def run_action_refresh_multi(self, action, eval_context={}):
record = eval_context.get('record', None)
records = eval_context.get('records', None)
self.env['bus.bus'].sendone('refresh', {
'uid': self.env.uid,
'model': action.model_name,
'ids': list(set().union(record and record.ids or [], records and records.ids or [])),
'create': record and record.exists() and record.create_date == record.write_date,
})
if not self.env.context.get('refresh_disable', False):
record = eval_context.get('record', None)
records = eval_context.get('records', None)
self.env['bus.bus'].sendone('refresh', {
'uid': self.env.uid,
'model': action.model_name,
'ids': list(set().union(record and record.ids or [], records and records.ids or [])),
'create': record and record.exists() and record.create_date == record.write_date,
})
Loading…
Cancel
Save