ooor 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +16 -11
- data/lib/app/models/open_object_resource.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -203,6 +203,21 @@ Call workflow: see code; TODO document
|
|
203
203
|
Call aribtrary method: see code; TODO document
|
204
204
|
|
205
205
|
|
206
|
+
REST HTTP API:
|
207
|
+
|
208
|
+
$ http://localhost:3000/res_partner
|
209
|
+
$ http://localhost:3000/res_partner.xml
|
210
|
+
$ http://localhost:3000/res_partner.json
|
211
|
+
$ http://localhost:3000/res_partner/2
|
212
|
+
$ http://localhost:3000/res_partner/2.json
|
213
|
+
$ http://localhost:3000/res_partner/2.xml
|
214
|
+
$ http://localhost:3000/res_partner/[2,3,4].xml
|
215
|
+
$ http://localhost:3000/res_partner/[2,3,4].json
|
216
|
+
|
217
|
+
$ TODO http://localhost:3000/res_partner.xml?active=1
|
218
|
+
|
219
|
+
$ TODO http://localhost:3000/res_partner.xml?domain=TODO
|
220
|
+
|
206
221
|
|
207
222
|
FAQ
|
208
223
|
------------
|
@@ -265,14 +280,4 @@ for the product.product controllers, it means creating a product_product_control
|
|
265
280
|
$ end
|
266
281
|
|
267
282
|
Now, if you register that new method in your route.rb file GET /product_product/1/foo will render "bar" on your browser screen.
|
268
|
-
You could instead just customize the existing CRUD methods so you don't need to regiter any other route in route.rb.
|
269
|
-
|
270
|
-
<script type="text/javascript">
|
271
|
-
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
272
|
-
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
273
|
-
</script>
|
274
|
-
<script type="text/javascript">
|
275
|
-
var pageTracker = _gat._getTracker("UA-369646-7");
|
276
|
-
pageTracker._initData();
|
277
|
-
pageTracker._trackPageview();
|
278
|
-
</script>
|
283
|
+
You could instead just customize the existing CRUD methods so you don't need to regiter any other route in route.rb.
|
@@ -64,7 +64,7 @@ class OpenObjectResource < ActiveResource::Base
|
|
64
64
|
self.openerp_database = '#{database}'
|
65
65
|
self.openerp_model = '#{model_key}'
|
66
66
|
self.openerp_id = #{param['id'] || false}
|
67
|
-
self.info = '#{param['info']}'
|
67
|
+
self.info = '#{(param['info'] || '').gsub("'",' ')}'
|
68
68
|
self.name = '#{param['name']}'
|
69
69
|
self.state = '#{param['state']}'
|
70
70
|
self.field_ids = #{(param['field_id'] and '[' + param['field_id'].join(',') + ']') || false}
|