some basic questions about your magento-openerp connector

271 views
Skip to first unread message

Si Chen

unread,
Nov 13, 2009, 2:43:57 PM11/13/09
to magento-openerp
Hi,

I'm really interested in your project. This is my first time on the
group, so please excuse my ignorance for asking this:

First of all, I noticed that your connector consists of a PHP
extension for Magento and Python for openERP. Do you think it is
better to use this PHP extension instead of the Magento Web services
API?

Second of all, may I ask what the relationship between this group and
the https://code.launchpad.net/magentoerpconnect is?

Thanks!

radouane

unread,
Nov 13, 2009, 5:22:43 PM11/13/09
to magento-openerp

Hi,
well the connector itself use the Magento Web services API
but also you can create your own magento API and use it with the
connector
you can benefit from the functions of the magento API and you can
create yours

for your second question I don't know I'm just a member of this group
I don't know the relationship with the link you posted !

Si Chen

unread,
Nov 13, 2009, 6:27:12 PM11/13/09
to magento-openerp
Thanks for answering. Actually, I was curious about Magento_extension/
Smile/ This seems to be a PHP extension that you are installing into
Magento, and I think the Python code uses XML RPC to call this
extension, instead of the Magento web services API. Is that correct?

radouane benzahra

unread,
Nov 13, 2009, 6:34:56 PM11/13/09
to magento...@googlegroups.com
the Python code of Magento_extension_Smile use SOAP not XML RPC
and it uses Magento web services API
you can call functions like 'product.create' that are declared in the Magento core API



Raphaël Valyi

unread,
Nov 14, 2009, 1:13:55 AM11/14/09
to magento...@googlegroups.com
Please guys,

I'm the orginial conceptor of the connector when I was working at Smile, I made 80% of the doc of the Smile connector and I tell you: I advise you to stop using that abandoned connector and start using the new one, it's way more complete and more mature. If you ask support from Smile, they will tell them themselves may be...
We had no time blogging about it yet because we spent our time making it instead. But it's ALREADY DOING MUCH MORE and is MUCH MORE MATURE:
- mapping Magento custom attributes, even those with custom options.
- offering custom mappings with the need to tweak the module/developp a new one
- properly retrieving the tax Magento will actually apply on the fly to your customer
- synchronysing customers and addresses objects for real with much better mappings
- multi-shop with each shop having the possibility of its own pricelist, it's own OpenERP stock warehouse (notice that Magento can still continue to apply its own discount system anyway).
- multi-magento websites
- multi-magento installation and even compatible with future other connector based on the generic infrastructure (3 out of 4 modules are generic)
- orders can be validated and depending of the shop settings, create pickings and invoices or not
- price including tax or not as you want per shop
- import products from Magento in a click
- import categories from Magento
- no need to tweak the discount field precision, done automatically at install
- secured, no crappy PHP file to copy anyware with a security hole anymore, only secured Magento API webservices
- resilient to network failure
- really smart updates that synch only things that actually changed and save bandwidth
- supported by the orginial conceptor of the "Smile" prototype, that's us Akretion.com
- supported by Sharoon Thomas (Openlabs/Publicus Solutions)
- supported in the close future by CampToCamp
- 3 of the 4 required modules will supported by other connector developpers, like for Spree Commerce. The core module base_external_referentials will be supported even by developpers of connectors with OpenERP and anything (like sugar CRM, any external system actually).
- ...


Early adopters will find the new project here:
You will need to install the Magento module from the bzr branch here:
And the OpenERP terminal module from the branch here:
that last module also depend on the following modules to be found in that OpenERP stable extra addons 5.0 branch:
the modules are: product_m2mcategories, base_external_referentials and base_sale_multichannels

Basic setup:
1) install both modules, make sure to install the Magento standard module properly (register its XML),
2) create a Magento webservice user
3) then create a new Magento instance in OpenERP
4) reload the mapping templates
5) do the basic synch
6) imports thing from Magento following button orders
7) re-export/import things back to Magento using the OpenERP shop form views (that get extended by extra buttons).


But please stop using code done mostly by noob trainee and start using some connector we can finally be proud of,


NB: we are have currently two customers going to prod with that new connector (none with old connector code you'll find here) There are deploying real international multi shop Magento's so the new connector is not a toy anymore and it has been totally re-thought by the most experienced OpenERP integrators around given the error we made in the first connector. Some used that first connector, but tweaked the code and never contributed back efficiently in a reusable way. This includes Smile unfortunately but frankly they were not proud of the deployment they made once this way. One custromer should go prod in a week, the other in 3/4 weeks. So we are still making some little improvements but I tell you, all we are adding now was never part of the original connector anyway you can all consider it bonus. Moreover, at Akretion.com , real engineers are coding the connectors while trainees do no dubious architecture but will instead to demo videos of the new connector we will release next week, sorry, but I was a bit pissed of by how big companies around show there muscles with marketing while their commitment to open source is very superficial.


Raphaël Valyi

olefoxe

unread,
Nov 16, 2009, 11:42:37 AM11/16/09
to magento-openerp
Hi.

Now i try to set up.
I installed this Moduls in Open ERP:

base_external_referentials
base_sale_multichannels
magentoerpconnect
product_m2mcategories

In Magento I installed the Openlabs_OpenERPConnector, and made a new
web services user.

Now:????
How to?:::::3) then create a new Magento instance in OpenERP ????

Referential Type: Magento Version 1.3.2.4
Default Product Category: ..Products..
Location: What should i insert??? Magento IP?

I got this error message:

"null value in column "name" violates not-null constraint"

...I can`t put something in the "name"-field???

Thank you.

Ole






On 14 Nov., 07:13, Raphaël Valyi <rva...@gmail.com> wrote:
> Please guys,
>
> as stated in a previous messagehttp://groups.google.fr/group/magento-openerp/browse_thread/thread/f3...
> And the OpenERP terminal module from the branch here:https://code.launchpad.net/~openerp-commiter/magentoerpconnect/magent...
> that last module also depend on the following modules to be found in that
> OpenERP stable extra addons 5.0 branch:https://code.launchpad.net/~openerp-commiter/openobject-addons/stable...
> Raphaël Valyihttp://www.akretion.com

Raphaël Valyi

unread,
Nov 16, 2009, 12:30:25 PM11/16/09
to magento...@googlegroups.com
Hello,

On Mon, Nov 16, 2009 at 2:42 PM, olefoxe <olaf....@googlemail.com> wrote:

Hi.

Now i try to set up.
I installed this Moduls in Open ERP:

base_external_referentials
base_sale_multichannels
magentoerpconnect
product_m2mcategories

In Magento I installed the Openlabs_OpenERPConnector, and made a new
web services user.

Now:????
How to?:::::3) then create a new Magento instance in OpenERP ????

Referential Type: Magento Version 1.3.2.4
Default Product Category: ..Products..
Location: What should i insert??? Magento IP?

Yes, that's the Magento IP or URL indeed
That's the same URL you use for the admin, minus the "admin/" end of the URL.

After that and entering the credentials, you should not forget to click on the "refresh the mapping templates" button.
 

I got this error message:

"null value in column "name" violates not-null constraint"

...I can`t put something in the "name"-field???

When exactly have you got this error?

There s currently on OpenERP web client bug preventing to fill the external referential name field in the form view. So if you are using the web client, that's a known issue, a work around is to hack th external referential form view to delete the attr="..." of the name field to allow setting the app up until Tiny fixes the issue.
If that's not a web client issue, then I'm not sure, could you details?


Let us know how it goes.


Raphaël Valyi

Olaf Vocks

unread,
Nov 17, 2009, 12:03:32 PM11/17/09
to magento...@googlegroups.com
Hy,

no i try to connect with the rich client. And get an error after trying to "synchronise referential settings" likr this:

File "/usr/lib/python2.5/xmlrpclib.py", line 785, in close
    raise ResponseError()
ResponseError: ResponseError()

I can`t connect openerp and magento???

Thank you and bye

Olaf

2009/11/16 Raphaël Valyi <rva...@gmail.com>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "magento-openerp" group.
To post to this group, send email to magento...@googlegroups.com
To unsubscribe from this group, send email to magento-opene...@googlegroups.com
For more options, visit this group at http://groups.google.fr/group/magento-openerp?hl=en
-~----------~----~----~----~------~----~------~--~---




--
Olaf Vocks

OpenBIG
Vertrieb & Projektrealisation

Schubertstrasse 32
D-49661 Cloppenburg
Phone: +49 (0) 44 71 / 88 48 64
Fax: +49 (0) 44 71 / 95 75 67
Mobil: +49 (0) 177 / 2708483

Sharoon Thomas

unread,
Nov 17, 2009, 12:06:26 PM11/17/09
to magento...@googlegroups.com
I have put up an installation doc, very simple one (not detailed).
Hope it help all involved


--

You received this message because you are subscribed to the Google Groups "magento-openerp" group.
To post to this group, send email to magento...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/magento-openerp?hl=.



--
Sharoon Thomas
Business Analyst & ERP Consultant

Mike Z

unread,
Nov 17, 2009, 11:12:56 PM11/17/09
to magento-openerp
Raphaël, can you provide more details on this hack? Do you hack the
database, a config file, and xml file, etc? Also, will this break
other things (with the magento sync), or lost features?

Or are you recommending to completely avoid the web client at all
costs?

Thanks

Raphaël Valyi

unread,
Nov 18, 2009, 1:00:03 AM11/18/09
to magento...@googlegroups.com
Hello Mike,

Edit the OpenERP view called "external_referential_form_view" using Adminsitration>Customization>User Interface
then replace:
<field name="name" attrs="{'readonly':[('mapping_ids','!=',[])]}"/>
by
<field name="name" />

save. Close any referential view completely and re-open a new one (of running in production mode, you should also restart the openerp web-client).

I'll report this web-client bug to Tiny as soon as I can.

By the way, the web client if fine in 99% of the case. Since my customers are still 10 000 km far away from me, the web client is actually the only low latency client usable remotely for OpenERP for me.


By, the way, I'm about to commit a serious product view improvement when using several attribut sets to avoids bloated tabs.


Raphaël valyi


Olaf Vocks

unread,
Nov 18, 2009, 5:38:08 AM11/18/09
to magento...@googlegroups.com
Hy,
 I try everything to connect, but I can not managed it.
Now my last error Message:

File "/usr/lib/python2.5/httplib.py", line 667, in connect
    socket.SOCK_STREAM):
gaierror: (-2, 'Name or service not known')


Maybe someone has an Idee. Thank you!

Ole

2009/11/17 Sharoon Thomas <sharoo...@teagarden.in>

Sharoon Thomas

unread,
Nov 18, 2009, 6:51:13 AM11/18/09
to magento...@googlegroups.com
I think the problem is you have given the wrong URL.
Can you mention the URL here

Olaf Vocks

unread,
Nov 18, 2009, 9:15:53 AM11/18/09
to magento...@googlegroups.com
Hi,

magento runs on a virtual ubuntu 9.04
open erp on a virtual debian 5.0

the last installation message from magento was:

Add "openbigshop2.org" to your DNS System!
Check your Magento URL with a browser: http://openbigshop2.org/magento
Magento Admin Panel: https://openbigshop2.org/magento/index.php/admin


Before I put "openbigshop2.org" to my local router into DNSMasq, it was possible to reach magento in a browser at https://192.168.1.81/magento/index.php/admin.
After putting the adress to DNSMasq it is now possible to reach mag under http://openbigshop2.org/magento/index.php/admin

Now I try both addresses with the tip from Raphael "That's the same URL you use for the admin, minus the "admin/" end of the URL."

Here are my results for the Open ERP / Magento Location:

for https://192.168.1.81/magento/index.php/

File "/usr/lib/python2.5/xmlrpclib.py", line 1191, in request
    headers
ProtocolError: <ProtocolError for 192.168.1.81/magento/index.php/index.php/api/xmlrpc/: 404 Not Found>


for http://192.168.1.81/magento/index.php/

File "/usr/lib/python2.5/xmlrpclib.py", line 1191, in request
    headers
ProtocolError: <ProtocolError for 192.168.1.81/magento/index.php/index.php/api/xmlrpc/: 302 Found>


for https://openbigshop2.org/magento/index.php/

File "/usr/lib/python2.5/httplib.py", line 1134, in connect
    sock.connect((self.host, self.port))
  File "<string>", line 1, in connect

gaierror: (-2, 'Name or service not known')

for http://openbigshop2.org/magento/index.php/

File "/usr/lib/python2.5/httplib.py", line 667, in connect
    socket.SOCK_STREAM):
gaierror: (-2, 'Name or service not known')


for https://192.168.1.81/magento

File "/usr/lib/python2.5/xmlrpclib.py", line 787, in close
    raise Fault(**self._stack[0])
Fault: <Fault 2: 'Access denied.'>


for http://192.168.1.81/magento

File "/usr/lib/python2.5/xmlrpclib.py", line 1191, in request
    headers
ProtocolError: <ProtocolError for 192.168.1.81/magento/index.php/api/xmlrpc/: 302 Found>



Thank you very very much...it would be great to get the connection done.

Ole











2009/11/18 Sharoon Thomas <sharoo...@teagarden.in>

Sharoon Thomas

unread,
Nov 18, 2009, 1:28:14 PM11/18/09
to magento...@googlegroups.com
The right option is:

for https://192.168.1.81/magento

File "/usr/lib/python2.5/xmlrpclib.py", line 787, in close
    raise Fault(**self._stack[0])
Fault: <Fault 2: 'Access denied.'>

And the error is that you have not created the web services user or password and allocated him a role. The role if not given complete previleges can also give you this err.

Jan Riewe

unread,
Nov 20, 2009, 6:49:09 PM11/20/09
to magento...@googlegroups.com
Hi Guys,

i have a problem with the connector (the new one... i may should move to
the new Mail list if there is one -
http://launchpad.net/magentoerpconnect) and a page with heaps of
attribute products.

At point 5 iam getting:
----------------- zip -------------
ValidateError

The value "boolean" for the field "frontend_input" is not in the
selection

-----------------------------------
Does someone my know how to get rid of that? how can i activate boolean
types?

This may comes from a older version of magento, cause i know the magento
what i want to connect is updated from 1.0 to 1.3.2.2
over the last year.

Thanks in advice

Bye
Jan

ps. your connector rocks!



web: http://esync.de

eLOOK Media

unread,
Nov 20, 2009, 10:09:02 PM11/20/09
to magento-openerp
You should have upgraded to 1.3.2.4 allready if it where only for
security reasons.
The connector is bases on this versions as you can see in the core
settings for Referential Type and this will read "Magento Version
1.3.2.4"
I think if you upgrade your Magento Install it will work.

On 21 nov, 00:49, Jan Riewe <j...@esync.de> wrote:
> Hi Guys,
>
> i have a problem with the connector (the new one... i may should move to
> the new Mail list if there is one -http://launchpad.net/magentoerpconnect) and a page with heaps of

Jan Riewe

unread,
Nov 21, 2009, 6:12:11 PM11/21/09
to magento...@googlegroups.com
Thanks for the tip. Tested but didn't helped me (updated to the stable
version which was successful, rerun Mapping and all steps till 5 where i
get the boolean bug again). May it be caused by some other issues with
this shop.

I've ignored the problem with the boolean problem and tried to import
products, to be more or less secure.

and this is what i get than ...

Environment Information :
System : Linux-2.6.30-2-686-i686-with-debian-squeeze-sid
OS Name : posix
Distributor ID: Debian
Description: Debian GNU/Linux 5.0.3 (lenny)
Release: 5.0.3
Codename: lenny
Operating System Release : 2.6.30-2-686
Operating System Version : #1 SMP Sat Sep 26 01:16:22 UTC 2009
Operating System Architecture : 32bit
Operating System Locale : de_DE.UTF8
Python Version : 2.5.4
OpenERP-Client Version : 5.0.6
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent
call last):
File "/usr/lib/openerp-server/netsvc.py", line 244, in dispatch
result = LocalService(service_name)(method, *params)
File "/usr/lib/openerp-server/netsvc.py", line 73, in __call__
return getattr(self, method)(*params)
File "/usr/lib/openerp-server/service/web_services.py", line 583, in
execute
res = service.execute(db, uid, object, method, *args)
File "/usr/lib/openerp-server/osv/osv.py", line 59, in wrapper
return f(self, dbname, *args, **kwargs)
File "/usr/lib/openerp-server/osv/osv.py", line 118, in execute
res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
File "/usr/lib/openerp-server/osv/osv.py", line 110, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/usr/lib/openerp-server/osv/orm.py", line 2077, in read
result = self._read_flat(cr, user, select, fields, context, load)
File "/usr/lib/openerp-server/osv/orm.py", line 2188, in _read_flat
res2 = self._columns[f].get(cr, self, ids, f, user, context=context,
values=res)
File "/usr/lib/openerp-server/osv/fields.py", line 646, in get
res = self._fnct(obj, cr, user, ids, name, self._arg, context)
File "/usr/lib/openerp-server/addons/base_sale_multichannels/sale.py",
line 81, in _get_exportable_product_ids
root_categories = [category for category in
shop.exportable_root_category_ids]
File "/usr/lib/openerp-server/osv/orm.py", line 229, in __getattr__
return self[name]
File "/usr/lib/openerp-server/osv/orm.py", line 223, in __getitem__
data[n] = self._list_class([browse_record(self._cr, self._uid, id,
self._table.pool.get(f._obj), self._cache, context=self._context,
list_class=self._list_class, fields_process=self._fields_process) for id
in data[n]], self._context)
File "/usr/lib/openerp-server/osv/orm.py", line 146, in __init__
raise BrowseRecordError(_('Wrong ID for the browse record, got %r,
expected an integer.') % (id,))
BrowseRecordError: Wrong ID for the browse record, got False, expected
an integer.


Maybe the installation is updated till death, so if the first bug is not
logical -> it may based in the installation.

cheers
Jan
> --
>
> You received this message because you are subscribed to the Google Groups "magento-openerp" group.
> To post to this group, send email to magento...@googlegroups.com.
> To unsubscribe from this group, send email to magento-opene...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/magento-openerp?hl=.
>
>


--
web: http://esync.de


eLOOK Media

unread,
Nov 22, 2009, 3:35:33 AM11/22/09
to magento-openerp
Maybe because you had an older versions things are messed up. Did you
try to setup a new database for Openerp and then run the installer and
try to import?
> > For more options, visit this group athttp://groups.google.com/group/magento-openerp?hl=.
>
> --
> web:http://esync.de

Mike Z

unread,
Nov 23, 2009, 6:45:05 PM11/23/09
to magento-openerp
Ok Raphaël: Suddenly, the openerp WEB client is working for me now.
I upgraded to the latest trunk today (magentoerpconnect_generic
(rev224) + openerp) and now the web client seems to work. Before, I
was not able to show details of products w/o using either the windows
client or the linux. I would always get this:

-----------------------------------------------------------------------------------------------------------------------
xarch, xfields = self.__view_look_dom_arch(cr, user, result
['arch'],
view_id, context=context)

File "/usr/lib/python2.5/site-packages/openerp-server/osv/orm.py",
line
1126, in __view_look_dom_arch
cr.execute('select name, model from ir_ui_view where (id=%s or
inherit_id=%s) and arch like %s', (view_id, view_id, '%%%s%%' %
field))
File "/usr/lib/python2.5/site-packages/openerp-server/sql_db.py",
line
76, in wrapper
return f(self, *args, **kwargs)
File "/usr/lib/python2.5/site-packages/openerp-server/sql_db.py",
line
120, in execute
res = self._obj.execute(query, params)
ProgrammingError: operator does not exist: integer = boolean
LINE 1: select name, model from ir_ui_view where (id=false or
inheri...
-----------------------------------------------------------------------------------------------------------------------

Seems to work OK now. Did you find something?

MIke

On Nov 17, 10:00 pm, Raphaël Valyi <rva...@gmail.com> wrote:
> Hello Mike,
>
> Edit the OpenERP view called "external_referential_form_view" using
> Adminsitration>Customization>User Interface
> then replace:
> <field name="name" attrs="{'readonly':[('mapping_ids','!=',[])]}"/>
> by
> <field name="name" />
>
> save. Close any referential view completely and re-open a new one (of
> running in production mode, you should also restart the openerp web-client).
>
> I'll report this web-client bug to Tiny as soon as I can.
>
> By the way, the web client if fine in 99% of the case. Since my customers
> are still 10 000 km far away from me, the web client is actually the only
> low latency client usable remotely for OpenERP for me.
>
> By, the way, I'm about to commit a serious product view improvement when
> using several attribut sets to avoids bloated tabs.
>
> Raphaël valyihttp://www.akretion.com

Daisy T.

unread,
Nov 5, 2013, 10:33:28 PM11/5/13
to magento...@googlegroups.com
hey guysm, I have some tips for those of us who have demand of Marketing tools/extension for Magento store like Inventory Management,  Affiliate Plus, Ajax Cart, Gift Card,
Social LoginAuction, Price BargainImage OptionProduct file upload you will sometimes be able to find a code for some free extension or promotion program. Might come in handy sometime. :)
Reply all
Reply to author
Forward
0 new messages