← Back to team overview

openerp-connector-community team mailing list archive

Re: import a new user field from mangento to openerp

 

Hello Markus,

thanks for your support,

this is my code, it's my first try in openerp connector so i really need
helps :)

# -*- coding: utf-8 -*-



from openerp.osv import orm, fields

from openerp.addons.connector.unit.mapper import mapping

from openerp.addons.magentoerpconnect.partner import PartnerImportMapper

from .backend import magento_myversion





class magento_res_partner(orm.Model):

    _inherit = 'magento.res.partner'



    _columns = {

        'fiscalinfo': fields.char('Codice Fiscale', readonly=True),

        }





@magento_myversion

class MyPartnerImportMapper(PartnerImportMapper):

    _model_name = 'magento.res.partner'



    direct = PartnerImportMapper.direct + [('fiscalinfo', 'fiscalcode')]


My questions is:

1) where i need to put this code? in the
/openerp-connector-magento/magentoerpconnect/partner.py

2) if yes, where in the code page?


Sorry for my really basic questions,


thanks,


Michele





2014-07-30 14:28 GMT+02:00 Markus Schneider <markus.schneider@xxxxxxxxxx>:

> Hi Michele,
>
> have you somewhere your code? Have you checked the log files of a syntax
> error?
>
> You should just have something like:
>
> @magento_myversion
> class myProductImportMapper(ProductImportMapper):
>     _model_name = 'magento.product.product'
>
>     direct = ProductImportMapper.direct + [('fiscalinfo', 'fiscalcode')]
>
> With all the stuff what you do in the tutorial [1] it should be
> everything to make it work.
>
> Kind Regards
>
> Markus
>
>
> [1] http://openerp-magento-connector.com/guides/tutorial_customize.html
>
> On 29.07.2014 20:06, Cooperativa Ceposs wrote:
> > Hello,
> >
> > i'm new with Openerp-magento connector, i did some test and everything
> > work ok.
> >
> > Only a thing:
> > i need to import a field called "fiscalinfo" form magento to openerp, i
> > did some try with the examples but for now when i test the modific the
> > "jobs" don't starts.
> >
> > Someone can help me in this?
> > The magento field is "fiscalinfo" and the openerp field is "fiscalcode"
> >
> > Thanks,
> > Michele
> >
> > --
> > CePoSS Società Cooperativa Sociale
> > Via Venezia 92/B
> > 35129 - Padova
> > Tel 049 8077882
> > Fax 049 8598341
> > www.cooperativaceposs.com <http://www.cooperativaceposs.com/>
> >
> > ---
> >
> > Questo messaggio è destinato unicamente alla/e persona/e sopraindicata/e.
> > E' strettamente personale e può contenere informazioni la cui
> > riservatezza è tutelata dalla normativa sulla privacy.
> > E' espressamente vietato alla/e persona/e non destinataria/e leggere,
> > copiare o comunque usare questo messaggio o diffonderne il contenuto
> > senza autorizzazione.
> > Chi ha ricevuto per errore questo messaggio è pregato di distruggerlo e
> > di informare la Cooperativa CePoSS rispondendo a questa mail.
> >
> >
>
> --
> Dipl.-Comp.-Math. Markus Schneider
> Softwareentwickler
>
> initOS GmbH & Co. KG
> An der Eisenbahn 1
> 21224 Rosengarten
>
> Mobil:   +49 (0)172 2303699
> Phone:   +49 (0)4105 5615613
> Fax:     +49 (0)4105 5615610
>
> Email:   markus.schneider@xxxxxxxxxx
> Web:     http://www.initos.com
>
> Geschäftsführung:
> Dipl. Wirt.-Inf. Frederik Kramer & Dipl.-Ing. (FH) Torsten Francke
> Haftende Gesellschafterin: initOS Verwaltungs GmbH
>
> Sitz der Gesellschaft: Rosengarten – Klecken
> Amtsgericht Tostedt, HRA 201840
> USt-IdNr: DE 275698169
> Steuer-Nr: 15/205/21402
>



-- 
CePoSS Società Cooperativa Sociale
Via Venezia 92/B
35129 - Padova
Tel 049 8077882
Fax 049 8598341
www.cooperativaceposs.com

---

Questo messaggio è destinato unicamente alla/e persona/e sopraindicata/e.
E' strettamente personale e può contenere informazioni la cui riservatezza
è tutelata dalla normativa sulla privacy.
E' espressamente vietato alla/e persona/e non destinataria/e leggere,
copiare o comunque usare questo messaggio o diffonderne il contenuto senza
autorizzazione.
Chi ha ricevuto per errore questo messaggio è pregato di distruggerlo e di
informare la Cooperativa CePoSS rispondendo a questa mail.

Follow ups

References