Connectors mailing list archives
connectors@odoo-community.org
Browse archives
Re: Help updateing Sale Orders customer note field
byHello to all,
I’m developing a custom extension tot he magentoerpconnector module on odoo.
So far we’re successfully using the Connector with Mag. 1.9.2.4 and Odoo 8.I’ve extended the connector so far,
that it does transport a custom customer note field from Magento to Odoo.
And I’m able to import the customer notes with a new Quotation/Order import,
but this field is possibly updated after import on Magento and has to be synched to odoo again.
As far as I can see this field is no more updated again after import and creation of the order.
How could I trigger an update of this custom field?
Code Snippets:/mymodule/sale.py
Import …
_logger = logging.getLogger(__name__)
_logger.info("kc_bbg_
datafeeding.sale")
class sale_order(osv.osv):
_inherit = 'sale.order'
_name = 'sale.order'
_columns = {
…
'kc_mag_customer_note'
: fields.text('Bestellkommentar' , help="Customer note imported from Magento", required=False), }
….
@magento(replacing=sale.
SaleOrderImportMapper) class KCBBGSaleOrderImportMapper(
sale.SaleOrderImportMapper): _model_name = 'magento.sale.order'
"""
Replacement Import Mapper
This replacemnt Importer adds the BBG-Style portion,
needed for their SaleOrder-handling
"""
@mapping
def kc_mag_customer_note(self, record):
_logger.info( """@mapping kc_mag_customer_note(self, record) """)
_logger.info( "record=[%s]" % repr(record['custom']))
return {'kc_mag_customer_note':
record['custom'][0]['value']}
Mit freundlichem Gruß
Zoran Vranesevic
- Anwendungsentwickler -
Kontor Consulting GmbH
Geschäftsführer
Tadeusz Nikitin
Willy-Brandt-Allee 31b
23554 Lübeck
Tel. +49 451 599 83 00
Fax +49 451 61 16 57 48Email: info@kontor.consulting
Website: www.kontor.consulting
Handelsregister: Amtsgericht Lübeck HRB 14643 HL
Ust-ID-Nr: DE298887575Sitz: Lübeck
______________________________
_________________
Mailing-List: https://odoo-community.org/groups/connectors-30
Post to: mailto:connectors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
Reference
-
Help updateing Sale Orders customer note field
by Kontor Consulting | Zoran Vranesevic <z.vranesevic@kontor.consulting> - 23/06/2017 10:53:38 - 0-
Re: Help updateing Sale Orders customer note field
byCamptocamp France SAS, Damien Crier
-