3. A bit of Theory
ïModule available on version trunk in
https://code.launchpad.net/~openerp-
dev/openobject-addons/trunk-google_spreadsheet-
dle
ïCan be used without module on other versions as
soon as you have the scripts for Google Docs
ïAvailable on
pad.openerp.com/p/gdoc_spreadsheet_script
ïAdd as a new script on your Google Doc Spreadsheet
28/06/13OpenDays 2013
4. A bit of Theory
ïThree methods available:
â oe_settings (through wizard): allow to connect to
your server
â oe_browse: Allow reading information inside
OpenERP's table
â oe_read_group: Allow reading information and
grouping according to specific criteria
ïUsed as methods inside the spreadsheets
28/06/13OpenDays 2013
5. A bit of Theory
ïBeware of the syntax
â =oe_browse("crm.lead"; "name user_id
country_id planned_revenue probability";
"["&IF(ISBLANK(B5),"","['channel_id','ilike','"&B
5&"'],")&IF(ISBLANK(B6),"","['categ_ids','ilike','"
&B6&"'],")&"['user_id','ilike','"&B11&"'],
['country_id','ilike','"&C11&"'],['state', 'not in',
['done','close', 'cancel']]['planned_revenue', '>',
0],['probability', '>', 0]]"; "planned_revenue desc"
; 5)
28/06/13OpenDays 2013
6. A bit of Theory
ïBeware of the syntax
â =oe_read_group("crm.lead", "create_date
country_id user_id _count planned_revenue",
"create_date country_id user_id",
"[['create_date', '>=', '"&'Leads Analysis'!B4&"-
01-01'],['create_date', '!=', false]]"; "";3 )
28/06/13OpenDays 2013
7. Exercices
ïConnect to your server
ïFetch the partners through oe_browse
ïAdd a domain
ïAdd a sorting order
ïAdd a limit
=oe_browse("object model"; "field_1 field_2";
"domain"; "orderby"; limit)
28/06/13OpenDays 2013
8. Exercices
ïFetch the stock.move data with oe_read_group
ïGroup by product_id
=oe_browse("object model"; "field_1
field_2";âfirst_group_by second_group_byâ
"domain"; "orderby"; limit)
28/06/13OpenDays 2013