diff options
| author | Yannick Tivisse <yti@odoo.com> | 2016-11-22 15:05:22 +0100 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2016-11-23 11:52:39 +0100 |
| commit | 98cb4719dbe90dbe980be4ad98f22fe155c2dae1 (patch) | |
| tree | f6c9a9294908207116782c6f8513f91d7aed6403 /doc/api_integration.rst | |
| parent | 94d2b97da4af28c551d246f14347f7674c4d50f5 (diff) | |
[REM] workflow: Remove workflow engine, documentation and tests
Diffstat (limited to 'doc/api_integration.rst')
| -rw-r--r-- | doc/api_integration.rst | 122 |
1 files changed, 0 insertions, 122 deletions
diff --git a/doc/api_integration.rst b/doc/api_integration.rst index a0f26d39343..1345915d797 100644 --- a/doc/api_integration.rst +++ b/doc/api_integration.rst @@ -1295,128 +1295,6 @@ activated as actual fields on the model. } ] -Workflow manipulations ----------------------- - -:ref:`reference/workflows` can be moved along by sending them *signals*. -Instead of using the top-level ``execute_kw``, signals are sent using -``exec_workflow``. - -Signals are sent to a specific record, and possibly trigger a transition on -the workflow instance associated with the record. - -.. container:: doc-aside - - .. warning:: this example needs ``account`` module installed - - .. switcher:: - - .. code-block:: python - - client = models.execute_kw( - db, uid, password, - 'res.partner', 'search_read', - [[('customer', '=', True)]], - {'limit': 1, 'fields': [ - 'property_account_receivable_id', - 'property_payment_term_id', - 'property_account_position_id'] - })[0] - invoice_id = models.execute_kw( - db, uid, password, - 'account.invoice', 'create', [{ - 'partner_id': client['id'], - 'account_id': client['property_account_receivable_id'][0], - 'invoice_line_ids': [(0, False, {'name': "AAA"})] - }]) - - models.exec_workflow( - db, uid, password, 'account.invoice', 'invoice_open', invoice_id) - - .. code-block:: php - - $client = $models->execute_kw( - $db, $uid, $password, - 'res.partner', 'search_read', - array(array(array('customer', '=', true))), - array( - 'limit' => 1, - 'fields' => array( - 'property_account_receivable_id', - 'property_payment_term_id', - 'property_account_position_id' - )))[0]; - $invoice_id = $models->execute_kw( - $db, $uid, $password, - 'account.invoice', 'create', array(array( - 'partner_id' => $client['id'], - 'account_id' => $client['property_account_receivable_id'][0], - 'invoice_line_ids' => array(array(0, false, array('name' => "AAA"))) - ))); - - $models->exec_workflow( - $db, $uid, $password, - 'account.invoice', 'invoice_open', - $invoice_id); - - .. code-block:: ruby - - client = models.execute_kw( - db, uid, password, - 'res.partner', 'search_read', - [[['customer', '=', true]]], - {limit: 1, fields: %w(property_account_receivable_id property_payment_term_id property_account_position_id)} - )[0] - invoice_id = models.execute_kw( - db, uid, password, - 'account.invoice', 'create', [{ - partner_id: client['id'], - account_id: client['property_account_receivable_id'][0], - invoice_line_ids: [[0, false, {name: "AAA"}]] - }]) - - models.exec_workflow( - db, uid, password, - 'account.invoice', 'invoice_open', invoice_id) - - .. code-block:: java - - final Map<String, Object> c = (Map<String, Object>) - ((Object[])models.execute("execute_kw", asList( - db, uid, password, - "res.partner", "search_read", - asList( - asList( - asList("customer", "=", true))), - new HashMap<String, Object>() {{ - put("limit", 1); - put("fields", asList( - "property_account_receivable_id", - "property_payment_term_id", - "property_account_position_id" - )); - }} - )))[0]; - final Integer invoice_id = (Integer)models.execute( - "execute_kw", asList( - db, uid, password, - "account.invoice", "create", - asList(new HashMap<String, Object>() {{ - put("partner_id", c.get("id")); - put("account_id", ((Object[])c.get("property_account_receivable_id"))[0]); - put("invoice_line_ids", asList( - asList(0, false, new HashMap<String, Object>() {{ - put("name", "AAA"); - }}) - )); - }}) - )); - - models.execute( - "exec_workflow", asList( - db, uid, password, - "account.invoice", "invoice_open", invoice_id)); - Report printing --------------- |
