Merge lp:~openerp-community/openobject-addons/extra-6.0-esale-joomla-view-fixes into lp:~openerp-community/openobject-addons/extra-trunk-esale_joomla

Proposed by Stefan Rijnhart (Opener)
Status: Merged
Merged at revision: 4658
Proposed branch: lp:~openerp-community/openobject-addons/extra-6.0-esale-joomla-view-fixes
Merge into: lp:~openerp-community/openobject-addons/extra-trunk-esale_joomla
Diff against target: 35 lines (+17/-1)
1 file modified
esale_joomla/esale_joomla_view.xml (+17/-1)
To merge this branch: bzr merge lp:~openerp-community/openobject-addons/extra-6.0-esale-joomla-view-fixes
Reviewer Review Type Date Requested Status
Lorenzo Battistini Pending
Review via email: mp+87799@code.launchpad.net

Description of the change

Hi Lorenzo,

thank you for your work on the esale_joomla module. Please consider these two additional fixes for getting this module to work under OpenERP 6.0, so that we can keep your branch as a central point for this module.

- Do not refer to the missing field 'rental' on the product form
- Fix the product view on Products by Web Category

Kind regards,
Stefan.

To post a comment you must log in.
4658. By Lorenzo Battistini

[MERGE] view fixes

Revision history for this message
Lorenzo Battistini (elbati) wrote :

Hello Stefan, thanks for your contribution.
Actually, I have not used esale_joomla for a long time.
If you confirm it works on OpenERP 6.0.*, we could merge it into lp:openobject-addons/extra-6.0 .
What do you think?

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Hi Lorenzo,

thanks for the merge! Yes, we should definitely merge into extra-6.0. I have two more fixes to test and upload:

- In the plugin, retrieve language 'iso' column, not 'shortcode' to prevent 'Cannot match language' problem during XML-RPC communication (the plugin reports language 'en' which does not match 'en_US' on the OpenERP side).
- Revise permissions (which are currently not loaded)

The second issue is quite straightforward, but I was wondering about the first: did you come across the first problem and did you try something similar? Cannot say yet whether our fix will actually work, as our customer's Joomla administrator does not work weekends ;-)

Cheers,
Stefan.

Revision history for this message
Lorenzo Battistini (elbati) wrote :

>
> - In the plugin, retrieve language 'iso' column, not 'shortcode' to prevent 'Cannot match language' problem during XML-RPC communication (the plugin reports language 'en' which does not match 'en_US' on the OpenERP side).
> - Revise permissions (which are currently not loaded)
>
> The second issue is quite straightforward, but I was wondering about the first: did you come across the first problem and did you try something similar? Cannot say yet whether our fix will actually work, as our customer's Joomla administrator does not work weekends ;-)

Uhm, you are right, I remember I had to edit some country code on
joomfish configuration.
If joomfish is still a dependency, we should mention it somewhere. I
think it would be good if we put a sort of quick installation guide
within the __openerp__.py

Revision history for this message
Daniel Stenlöv (daniel-stenlov-xclude) wrote :

If you want to support multiple languages in the VirtueMart/Joomla system you will need to install joomfish. But if you are just using 1 language in your VM/J installation this isn't needed even if you do have multiple languages in your OpenERP installation. You will however need to have the same languages in both system.

But there should be written somewhere that the xmlrpc plugin needs to be installed on the Joomla system. Easiest way to do this is to pack the included plugin into a zip file and then install it as a normal Joomla plugin.

Of my knowledge the OpenERP Joomla plugin doesn't support multiple stores or changed database path, the path need to be vm at this moment. I have been thinking of fixing this.

The plugin uses the database handler from Joomla, but it should really use the handler from VirtueMart or even better use the functions in VirtueMart. The plugin is badly in need of some love.

/Best wishes, Daniel

Revision history for this message
Daniel Stenlöv (daniel-stenlov-xclude) wrote :

I just noticed that some of the queries is does also need joomla to use the name jos.

For example tax:
SELECT tax_rate FROM jos_vm_tax_rate where tax_rate_id = (SELECT shipping_rate_vat_id FROM jos_vm_shipping_rate where shipping_rate_id = ".$order_shipping_rate_id.")

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'esale_joomla/esale_joomla_view.xml'
2--- esale_joomla/esale_joomla_view.xml 2011-02-25 09:23:22 +0000
3+++ esale_joomla/esale_joomla_view.xml 2012-01-06 18:57:24 +0000
4@@ -515,7 +515,7 @@
5 <field name="model">product.product</field>
6 <field name="inherit_id" ref="view_product_book_form"/>
7 <field name="arch" type="xml">
8- <field name="rental" position="after">
9+ <field name="purchase_ok" position="after">
10 <field name="online" select="2"/>
11 </field>
12 </field>
13@@ -539,6 +539,22 @@
14 <field name="view_type">tree</field>
15 <field name="view_id" ref="esale_joomla_category_tree_view"/>
16 </record>
17+ <record id="esale_product_action_tree" model="ir.actions.act_window">
18+ <field name="name">Products</field>
19+ <field name="type">ir.actions.act_window</field>
20+ <field name="res_model">product.product</field>
21+ <field name="view_type">form</field>
22+ <field name="view_mode">tree,form</field>
23+ <field name="domain">[('esale_category_ids','=',active_id)]</field>
24+ <field name="context">{'esale_category_ids':active_id}</field>
25+ </record>
26+ <record id="ir_esale_product_category_open" model="ir.values">
27+ <field name="key2">tree_but_open</field>
28+ <field name="model">esale_joomla.category</field>
29+ <field name="name">Products by Web Category</field>
30+ <field eval="'ir.actions.act_window,%d'%esale_product_action_tree" name="value"/>
31+ <field eval="True" name="object"/>
32+ </record>
33 <menuitem action="esale_joomla_category_action" id="menu_product_category_action" parent="base.menu_product" sequence="1"/>
34
35 <record id="esale_joomla_category_action_form" model="ir.actions.act_window">