Refresh Partner on Creation
code
on_create
env["bus.bus"].sendone("refresh", {
"create": record.exists() and record.create_date == record.write_date,
"model": model._name,
"uid": env.user.id,
"ids": (record | records).mapped("id")})
Refresh Partner on Update
code
on_write
env["bus.bus"].sendone("refresh", {
"create": record.exists() and record.create_date == record.write_date,
"model": model._name,
"uid": env.user.id,
"ids": (record | records).mapped("id")})
Refresh Partner on Deletion
code
on_unlink
env["bus.bus"].sendone("refresh", {
"create": record.exists() and record.create_date == record.write_date,
"model": model._name,
"uid": env.user.id,
"ids": (record | records).mapped("id")})
Refresh Users on Creation/Update
code
on_create_or_write
env["bus.bus"].sendone("refresh", {
"create": record.exists() and record.create_date == record.write_date,
"model": model._name,
"uid": env.user.id,
"ids": (record | records).mapped("id")})