[IMP] sale, edi: removed auto-email sending at sale.order confirmation (not needed anymore since the email sending is included in the workflow) + removed the stuff related to delay field (moved to sale_stock, but not needed anyway)

bzr revid: qdp-launchpad@openerp.com-20120919131049-ccbplqqum4c7eah4
This commit is contained in:
Quentin (OpenERP) 2012-09-19 15:10:49 +02:00
parent 18dfb6db3a
commit bd06e2f3f4
2 changed files with 1 additions and 26 deletions

View File

@ -188,14 +188,6 @@ class sale_order(osv.osv, EDIMixin):
self._edi_requires_attributes(( 'product_id', 'product_uom', 'product_qty', 'price_unit'), order_line)
order_line['product_uom_qty'] = order_line['product_qty']
del order_line['product_qty']
#Need to move sale_stock
# date_planned = order_line.pop('date_planned')
# delay = 0
# if date_order and date_planned:
# # no security_days buffer, this is the promised date given by supplier
# delay = (datetime.strptime(date_planned, DEFAULT_SERVER_DATE_FORMAT) - \
# datetime.strptime(date_order, DEFAULT_SERVER_DATE_FORMAT)).days
# order_line['delay'] = delay
# discard web preview fields, if present
order_line.pop('price_subtotal', None)
@ -219,9 +211,6 @@ class sale_order_line(osv.osv, EDIMixin):
# company.security_days is for internal use, so customer should only
# see the expected date_planned based on line.delay
# date_planned = datetime.strptime(line.order_id.date_order, DEFAULT_SERVER_DATE_FORMAT) + \
# relativedelta(days=line.delay or 0.0)
# edi_doc['date_planned'] = date_planned.strftime(DEFAULT_SERVER_DATE_FORMAT)
edi_doc_list.append(edi_doc)
return edi_doc_list

View File

@ -1,15 +1,6 @@
<?xml version="1.0" ?>
<openerp>
<data>
<!-- EDI Export + Send email Action -->
<record id="ir_actions_server_edi_sale" model="ir.actions.server">
<field name="code">if not object.partner_id.opt_out: object.edi_export_and_email(template_ext_id='sale.email_template_edi_sale', context=context)</field>
<field name="state">code</field>
<field name="type">ir.actions.server</field>
<field name="model_id" ref="sale.model_sale_order"/>
<field name="condition">True</field>
<field name="name">Auto-email confirmed sale orders</field>
</record>
<!-- EDI related Email Templates menu -->
<record model="ir.actions.act_window" id="action_email_templates">
@ -25,14 +16,9 @@
</data>
<!-- Mail template and workflow bindings are done in a NOUPDATE block
<!-- Mail template is done in a NOUPDATE block
so users can freely customize/delete them -->
<data noupdate="1">
<!-- bind the mailing server action to sale.order confirmed activity
<record id="sale.act_wait_ship" model="workflow.activity">
<field name="action_id" ref="ir_actions_server_edi_sale"/>
</record>-->
<!--Email template -->
<record id="email_template_edi_sale" model="email.template">