You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

70 lines
3.0 KiB

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2018 MuK IT GmbH
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<odoo noupdate="1">
<record id="base_automation_refresh_partner_on_create" model="base.automation">
<field name="name">Refresh Partner on Creation</field>
<field name="model_id" ref="base.model_res_partner" />
<field name="state">code</field>
<field name="trigger">on_create</field>
<field name="code">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")})</field>
</record>
<record id="base_automation_refresh_partner_on_write" model="base.automation">
<field name="name">Refresh Partner on Update</field>
<field name="model_id" ref="base.model_res_partner" />
<field name="state">code</field>
<field name="trigger">on_write</field>
<field name="code">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")})</field>
</record>
<record id="base_automation_refresh_partner_on_unlink" model="base.automation">
<field name="name">Refresh Partner on Deletion</field>
<field name="model_id" ref="base.model_res_partner" />
<field name="state">code</field>
<field name="trigger">on_unlink</field>
<field name="code">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")})</field>
</record>
<record id="base_automation_refresh_partner_on_create_or_write" model="base.automation">
<field name="name">Refresh Users on Creation/Update</field>
<field name="model_id" ref="base.model_res_users" />
<field name="state">code</field>
<field name="trigger">on_create_or_write</field>
<field name="code">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")})</field>
</record>
</odoo>