Dear all,

Don't flame me ... but I am dreaming of a complete integration of Ubercart with OpenERP.
OpenERP Proxy API could be used for that, in these fields:
* Product categories.
* Product list and definition.
* Prices.
* VAT support.

Presently, I am working on a solution to export new clients and invoices from Ubercart to OpenERP.
But this is not really integration work.

Comments

BoogieBug’s picture

Such integration is my dream too ;)

Anyway, instead of including the features in this module, I'd suggest to create a new module for the integration and leave this module an API module as the common module for any other further integrations or extensions.

What do you think?

podarok’s picture

already started working on this
my idea is

using feeds module we need
- creation for fetchers and mappers using openerp proxy api for getting source fields
- using http://drupal.org/project/uc_feeds we can extend list of mapping drupal fields and write even more for it
- using ir.model.fields + product.product models we can create custom fields for syncronization drupal->openerp (filling Product database in OpenERP from current Ubercart database in drupal)
- using feeds mapper we can syncronize drupal ubercart with products and prices from openerp product.product model
- using cck and feeds we can sync drupal Product content type with fields from OpenERP using feeds + custom fetchers and mappers

all we need - to write feeds fetcher (for getting info via xml-rpc), parser (for selecting different fields) and processor (for mapping fields from openerp array into node,cck,taxonomy data)

podarok’s picture

podarok’s picture

2grub3

Do You have any code about exporting clients and invoices from Ubercart?

I already do the export->import to openerp via csv but want to integrate it for automation via feeds

grub3’s picture

@padorak: It took me a hard time to export clients and invoices.
It seems to me we should first export uc_orders to clients.
Then export uc_orders to invoices.

I created views in PostgreSQL and exported the list of clients:

CREATE OR REPLACE VIEW export_clients AS 
 SELECT uc_orders.uid AS ref, uc_orders.primary_email AS "address/email", (uc_orders.billing_first_name::text || ' '::text) || uc_orders.billing_last_name::text AS "address/name", uc_orders.billing_phone AS "address/phone", 
        CASE
            WHEN uc_orders.billing_company::text <> ''::text THEN uc_orders.billing_company::text
            ELSE (uc_orders.billing_first_name::text || ' '::text) || uc_orders.billing_last_name::text
        END AS name, uc_orders.billing_street1 AS "address/street", uc_orders.billing_street2 AS "address/street2", uc_orders.billing_city AS "address/city", uc_orders.billing_postal_code AS "address/zip"
   FROM uc_orders
  WHERE uc_orders.order_id > 0 AND uc_orders.order_id = (( SELECT max(u2.order_id) AS max
           FROM uc_orders u2
          WHERE uc_orders.uid::integer = u2.uid::integer))
  ORDER BY uc_orders.uid;

Under MySQL, remove the cast ::integer, ::text, etc... It should work.

The result of the view can be imported in OpenERP automatically.

I still need to process invoices the same way.
Sorry for this kind of procedure, I had no time and no knowledge a bridge with OpenERP was in development.

Kind regards,
Grub3

grub3’s picture

@padorak: could you release ofields as an unstable module?
Oh I see this is a brand new module. Cool I will test it.

maxchock’s picture

Hi all,

Has anyone actually successfully setup the integration? I'm running ubercart too and desperately need to integrate with an ERP system for better resource planning.

Hope someone can give some hint and guidance.

Thanks & regards,
Max Chock.

BoogieBug’s picture

Current version is not integrated with Ubercart yet. The feature is under progress, I guess.

podarok’s picture

http://drupal.org/node/1152924

one way ticked done 8)

podarok’s picture

Status: Active » Needs review
chadmkidner’s picture

Hello, also interested in this. What's the status here? I see the last update was a year ago.. is this still in the works? I'd be willing to test/ add input for developing if it is.

podarok’s picture

There are few feeds based pluging for Feeds OpenERP Fetcher and OpenERP Processor http://drupal.org/node/1152924