[ADD] support for big action link button thing

This commit is contained in:
Xavier Morel 2015-07-09 16:12:57 +02:00
parent f8d202061a
commit 9f89a9900f
2 changed files with 20 additions and 5 deletions

View File

@ -1,6 +1,7 @@
import Queue
import collections
import threading
import urllib
import xmlrpclib
from xml.etree import ElementTree as ET
@ -74,7 +75,22 @@ class Fields(Directive):
return q
class Action(Directive):
pass
required_arguments = 1
final_argument_whitespace = True
has_content = True
def run(self):
self.assert_has_content()
external_id = self.arguments[0]
text = "action button"
node = nodes.reference(
refuri='https://demo.odoo.com?{}'.format(urllib.urlencode({
'module': external_id
})),
classes=['btn', 'btn-primary', 'btn-lg', 'btn-block', 'center-block']
)
self.state.nested_parse(self.content, self.content_offset, node)
return [node]
class OdooDemoDomain(Domain):
name = 'demo'

View File

@ -61,10 +61,9 @@ Types`
.. demo:fields:: account_asset.action_account_asset_asset_list_normal_sale
+--------------------------------------------------------+
| **View Asset Types in the our online demonstration** |
+========================================================+
+--------------------------------------------------------+
.. demo:action:: account_asset.action_account_asset_asset_list_normal_sale
View *Asset Types* in our Online Demonstration
Create assets manually
======================