Mathias Markl 7 years ago
parent
commit
1586a13475
  1. 1
      muk_web_client_refresh/__manifest__.py
  2. 46
      muk_web_client_refresh/data/refresh_actions.xml

1
muk_web_client_refresh/__manifest__.py

@ -37,6 +37,7 @@
"template/assets.xml", "template/assets.xml",
"views/refresh_action_view.xml", "views/refresh_action_view.xml",
"views/res_config_settings_view.xml", "views/res_config_settings_view.xml",
"data/refresh_actions.xml",
], ],
"qweb": [ "qweb": [
"static/src/xml/*.xml", "static/src/xml/*.xml",

46
muk_web_client_refresh/data/refresh_actions.xml

@ -0,0 +1,46 @@
<?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", {"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", {"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", {"model": model._name, "uid": env.user.id, "ids": (record | records).mapped("id")})</field>
</record>
</odoo>
Loading…
Cancel
Save