Cash on delivery
I want create a module for cash delivery. I have 2 options, inherit
_add_cash_on_delivery_line or create a new function.
I try both options with not result. I don't knhow why but not used my
function.
Example function:
@magento_myversion
class CashDeliverySeur(SaleOrderImportMapper):
_model_name = 'magento.sale.oder'
def _add_cash_on_delivery_line_seur(self, map_record,values):
record = map_record.source
amount = float(record.get('i4seur_cashondelivery_surcharge') or
0.0)
print "hola*******************"
if not amount:
return values
line_builder =
self.get_connector_unit_for_model(MagentoCashOnDeliveryLineBuilder)
backend = self.backend_record
print "hola*******************"
tax_include = self.options.tax_include
line_builder.price_unit = amount_incl if tax_include else
amount_excl
line = (0, 0, line_builder.get_line())
values['order_line'].append(line)
return values
--
Alberto Garcia
Consultor Funcional / Jefe Proyecto
--
Mailing list: https://launchpad.net/~openerp-connector-community
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-connector-community
More help : https://help.launchpad.net/ListHelp