forked from Techsystech/web
[ADD] Demo data for testing
parent
a7843d6049
commit
e08bd6520a
|
@ -22,6 +22,8 @@ A use case could be the case of a validation flow. As a developer, you set up a
|
|||
Usage
|
||||
=====
|
||||
|
||||
See the 'Previous Partner' and 'Next Partner' buttons that this module's demo data adds to the partner form view.
|
||||
|
||||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
|
||||
:alt: Try me on Runbot
|
||||
:target: https://runbot.odoo-community.org/runbot/162/10.0
|
||||
|
|
|
@ -14,6 +14,9 @@
|
|||
'data': [
|
||||
'views/assets.xml',
|
||||
],
|
||||
'demo': [
|
||||
'demo/demo_action.xml',
|
||||
],
|
||||
'installable': True,
|
||||
'license': 'AGPL-3',
|
||||
'url': 'https://github.com/oca/web',
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
|
||||
<record model="ir.actions.server" id="demo_pager_previous">
|
||||
<field name="name">Previous partner</field>
|
||||
<field name="model_id" ref="base.model_res_partner"/>
|
||||
<field name="code">action = {"type": "ir_actions_act_window_page_prev"}</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.server" id="demo_pager_next">
|
||||
<field name="name">Next partner</field>
|
||||
<field name="model_id" ref="base.model_res_partner"/>
|
||||
<field name="code">action = {"type": "ir_actions_act_window_page_next"}</field>
|
||||
</record>
|
||||
|
||||
<!-- Adding some redundant buttons to the partner form so that this module can be tested on runbot.
|
||||
You might be more interested in returning this action type from a method in your code. -->
|
||||
<record id="view_partner_form" model="ir.ui.view">
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<div class="oe_button_box" position="inside">
|
||||
<button name="%(web_ir_actions_act_window_page.demo_pager_previous)d"
|
||||
type="action" string="Previous Partner"
|
||||
icon="fa-arrow-left"
|
||||
class="oe_stat_button"/>
|
||||
<button name="%(web_ir_actions_act_window_page.demo_pager_next)d"
|
||||
type="action" string="Next Partner"
|
||||
icon="fa-arrow-right"
|
||||
class="oe_stat_button"/>
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
Loading…
Reference in New Issue