OpenERP server action, one of the most powerful features, no

Source: Internet
Author: User

[Email protected] produced

@jeffery-Memorization

Principle

Ations

OE defines the ir.actions.actions and derives many subclasses from it.

    • Ir.actions.client
    • ir.actions. Act_url
    • Ir.actions.act_window
    • Ir.actions.act_window_close
    • Ir.actions.wizard
    • Ir.actions.server

Used to perform related actions.

??

Server Action

there is a subclass Ir.actions.server that can be used to perform server-side actions.

The actions that can be performed are;

' State ': fields.selection ([

(' client_action ', ' Client action '),

(' Dummy ', ' dummy '),

(' Loop ', ' iteration '),

(' Code ', ' Python code '),

(' Trigger ', ' trigger '),

(' email ', ' email '),

(' SMS ', ' SMS '),

(' object_create ', ' Create object '),

(' object_copy ', ' Copy object '),

(' Object_write ', ' Write object '),

(' Other ', ' Multi Actions '),

], ' action type ', Required=true, size=32, help= "type of the Action" is executed "),

??

??

Can be used to do all kinds of things

??

Automated Action Rules

The module defines the automatic action rules

- for what object

- conditions

- Action , that is, the action defined by Server_action

??

When to trigger

    • Timer Trigger
    • injected into the Create/write method of the object

??

Usage Scenarios

For example

    • When a task is assigned, send a notification message to the assigned person
    • Timed reminders
    • When you receive a message, create an instance of the object

??

Actual operation

Establish server_actions.

Menu Settings/technical/actions/server Actions

??

Create a new action

Object selects Task, i.e. project.task

Action type Select Email

There are a number of action options available , as follows

??

Customizing message Content

    • Mail Recipient
    • Main message
    • Message content

??

tip, if you do not know the properties of the object, you can click on the Pop-up window button to popup the Task Definition window

??

??

After setting the relevant parameters, save

So far , the server_action is set up.

??

set automatic action rule so that the action can be triggered.

Menu settings/technical/automated actions/automated Actions

??

Create a automatic action rule.

Enter rule name

Select the appropriate object, where you select the task , which is project.task

??

Set conditions

Purpose to filter which objects can perform server actions

Description

If the timer is not set, the server action is triggered when Crete/update object, otherwise it is triggered by the time set by the timer, but the corresponding object instance is filtered according to the parameters set by the trigger date.

??

??

set up actions

Click ADD button, select the server action you have created in the popup window, or create a new server action.

??

Prompted

multiple actions can be added, and actions are performed in sequence order

??

??

Note

Change. The change is the fields of the object.

Add followers, refers to assigning subscribers to this instance of object (but with conditions, see the code specifically ;))

??

Scheduled Tasks

Automatic action rules are performed periodically by Ir.cron, such as

??

??

Additional Instructions

??

??

Code injected into the object creation, modification method

??

Modify The Create method

??

Modify The Write method

??

when you perform an action, modify fields to change and the associated code for add follower

??

??

??

Summary

??

    • If you use filter. Do not assign Res.user to filter !!! Otherwise, there will be permissions problems occur!!!

??

    • If a timer is set. Does not inject into the model, does not trigger the action

      ??

??

??

    • If a timer is set. and No action is triggered when the time condition is immature

      ??

OpenERP server action, one of the most powerful features, no

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.