[REM] sale,purchase: temporarily disable EDI until reviewed
bzr revid: odo@openerp.com-20111005003504-nqo2wm2313dfxvc3
This commit is contained in:
parent
05497056de
commit
49ee09b8ce
|
@ -26,6 +26,6 @@ import wizard
|
|||
import report
|
||||
import stock
|
||||
import company
|
||||
import edi_purchase_order
|
||||
#import edi_purchase_order
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ Dashboard for purchase management that includes:
|
|||
'process/purchase_process.xml',
|
||||
'report/purchase_report_view.xml',
|
||||
'board_purchase_view.xml',
|
||||
'edi_purchase_order_data.xml',
|
||||
#'edi_purchase_order_data.xml',
|
||||
],
|
||||
'test': [
|
||||
'test/purchase_from_order.yml',
|
||||
|
@ -67,7 +67,7 @@ Dashboard for purchase management that includes:
|
|||
'purchase_unit_test.xml',
|
||||
'test/procurement_buy.yml',
|
||||
'test/purchase_report.yml',
|
||||
'test/edi_purchase_order.yml',
|
||||
#'test/edi_purchase_order.yml',
|
||||
],
|
||||
'demo': ['purchase_demo.xml'],
|
||||
'installable': True,
|
||||
|
|
|
@ -29,5 +29,5 @@ import sale_installer
|
|||
import wizard
|
||||
import report
|
||||
import company
|
||||
import edi_sale_order
|
||||
#import edi_sale_order
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -85,11 +85,11 @@ Dashboard for Sales Manager that includes:
|
|||
'stock_view.xml',
|
||||
'board_sale_view.xml',
|
||||
'process/sale_process.xml',
|
||||
'edi_sale_order_data.xml',
|
||||
#'edi_sale_order_data.xml',
|
||||
],
|
||||
'demo_xml': ['sale_demo.xml'],
|
||||
'test': [
|
||||
'test/edi_sale_order.yml',
|
||||
#'test/edi_sale_order.yml',
|
||||
'test/data_test.yml',
|
||||
'test/manual_order_policy.yml',
|
||||
'test/prepaid_order_policy.yml',
|
||||
|
|
|
@ -67,24 +67,17 @@ class sale_order(osv.osv, ir_edi.edi):
|
|||
#PO: No
|
||||
'notes': True,
|
||||
}
|
||||
|
||||
}
|
||||
company_pool = self.pool.get('res.company')
|
||||
res_company = self.pool.get('res.company')
|
||||
edi_doc_list = []
|
||||
for order in records:
|
||||
# Get EDI doc based on struct. The result will also contain all metadata fields and attachments.
|
||||
edi_doc = super(sale_order,self).edi_export(cr, uid, [order], edi_struct, context)
|
||||
if not edi_doc:
|
||||
continue
|
||||
edi_doc = edi_doc[0]
|
||||
edi_doc = super(sale_order,self).edi_export(cr, uid, [order], edi_struct, context)[0]
|
||||
currency = order.company_id.currency_id
|
||||
# Add company info and address
|
||||
edi_company_document = company_pool.edi_export_address(cr, uid, [order.company_id], context=context)[order.company_id.id]
|
||||
edi_doc.update({
|
||||
'company_address': edi_company_document['company_address'],
|
||||
'currency_id': currency and self.edi_m2o(cr, uid, currency, context=context) or False,
|
||||
#'company_logo': edi_company_document['company_logo'],#TODO
|
||||
})
|
||||
edi_address = res_company.edi_export_address(cr, uid, [order.company_id], context=context)[0]
|
||||
edi_doc.update(company_address=edi_address,
|
||||
currency_id=(currency and self.edi_m2o(cr, uid, currency, context=context) or False))
|
||||
#TODO: company_logo
|
||||
edi_doc_list.append(edi_doc)
|
||||
return edi_doc_list
|
||||
|
||||
|
@ -124,7 +117,7 @@ class sale_order(osv.osv, ir_edi.edi):
|
|||
def edi_import(self, cr, uid, edi_document, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
|
||||
#import company as a new partner
|
||||
partner_id = self.edi_import_company(cr, uid, edi_document, context=context)
|
||||
|
||||
|
|
Loading…
Reference in New Issue