From 1315dd7cee7a072a50425214a0f04d7804fb4963 Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Fri, 9 Jul 2010 13:38:41 +0530 Subject: [PATCH 01/15] [IMP] purchase_requisition: Improve the yml bzr revid: sbh@tinyerp.com-20100709080841-ttotmvpnqc3c9xy4 --- .../test/purchase_requisition.yml | 24 ++++++++++++------- .../test/purchase_requisition_exclusive.yml | 14 +++++------ 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/addons/purchase_requisition/test/purchase_requisition.yml b/addons/purchase_requisition/test/purchase_requisition.yml index 0ace2312034..ce5f9635574 100644 --- a/addons/purchase_requisition/test/purchase_requisition.yml +++ b/addons/purchase_requisition/test/purchase_requisition.yml @@ -63,7 +63,7 @@ proc_obj = self.pool.get('procurement.order') proc_obj._procure_confirm(cr,uid) - - On the purchase tender, I create a new purchase order for the supplier 'DistriPC' by clicking on + On the purchase requisition, I create a new purchase order for the supplier 'DistriPC' by clicking on the button 'New RfQ'. This opens a window to ask me the supplier and I set DistriPC . - !record {model: purchase.requisition.partner, id: purchase_requisition_partner_0}: @@ -74,23 +74,25 @@ - !python {model: purchase.requisition.partner}: | req_obj = self.pool.get('purchase.requisition') - ids =req_obj.search(cr, uid, [('origin','=','TEST/TENDER/0001')]) + ids =req_obj.search(cr, uid, [('origin','=','Laptop ACER')]) self.create_order(cr, uid, [ref("purchase_requisition_partner_0")], {"lang": 'en_US', "active_model": "purchase.requisition", "tz": False, "record_id": 1, "active_ids": ids, "active_id": ids[0], }) - - I check that I have two purchase orders on the purchase tender. + I check that I have two purchase orders on the purchase requisition. - !python {model: purchase.order}: | + from tools.translate import _ order_ids =self.search(cr, uid, [('origin','=','TEST/TENDER/0001')]) ids=len(order_ids) - assert (ids==2), "Purchase order hasn't Created" + assert(ids == 2), _('Purchase Order not Created') + - I set the purchase requisition as 'Not Exclusive'. - !python {model: purchase.requisition}: | - ids =self.search(cr, uid, [('origin','=','TEST/TENDER/0001')]) + ids =self.search(cr, uid, [('origin','=','Laptop ACER')]) self.write(cr,uid,ids[0],{'exclusive': 'multiple' }) - I change the quantities so that the purchase order for DistriPC includes 3 pieces and the @@ -100,7 +102,7 @@ line_obj=self.pool.get('purchase.order.line') partner_obj=self.pool.get('res.partner') requistion_obj=self.pool.get('purchase.requisition') - requistion_ids =requistion_obj.search(cr, uid, [('origin','=','TEST/TENDER/0001')]) + requistion_ids =requistion_obj.search(cr, uid, [('origin','=','Laptop ACER')]) partner_id1=partner_obj.search(cr,uid,[('name','=','ASUStek')])[0] partner_id2=partner_obj.search(cr,uid,[('name','=','Distrib PC')])[0] purchase_id1= self.search(cr, uid, [('partner_id','=',partner_id1),('requisition_id','in',requistion_ids)]) @@ -123,11 +125,13 @@ I check that the delivery order of the customer is in state 'Waiting Goods'. - !python {model: stock.picking }: | + from tools.translate import _ picking_id = self.search(cr, uid, [('origin','=','TEST/TENDER/0001'),('type','=','delivery')]) if picking_id: pick=self.browse(cr,uid,picking_id[0]) - assert (pick.state) =='confirmed'," Order is not confirm" - assert(pick.move_lines[0].state=='wating'),'Order is not wating"' + assert (pick.state =='confirmed'),_('Picking is not in confirm state.') + assert (pick.move_lines[0].state == 'waiting'), _('Stock Move is not Waiting state.') + - I receive the order of the supplier Asustek from the Incoming Products menu. - @@ -176,8 +180,10 @@ I check that the delivery order of the customer is in the state Available. - !python {model: stock.picking }: | + from tools.translate import _ picking_id = self.search(cr, uid, [('origin','=','TEST/TENDER/0001'),('type','=','out')]) if picking_id: pick=self.browse(cr,uid,picking_id[0]) - assert (pick.state) =='available'," Order is not available" + print pick.state + assert(pick.state == 'assigned'), _('Picking is not in available state') diff --git a/addons/purchase_requisition/test/purchase_requisition_exclusive.yml b/addons/purchase_requisition/test/purchase_requisition_exclusive.yml index 641fd740de3..84a6bb0d68f 100644 --- a/addons/purchase_requisition/test/purchase_requisition_exclusive.yml +++ b/addons/purchase_requisition/test/purchase_requisition_exclusive.yml @@ -60,11 +60,11 @@ 5 Laptop ACER, and a purchase order on the default supplier for this product. - !python {model: purchase.requisition}: | - requisition_ids =self.search(cr, uid, [('origin','=','TEST/TENDER/0002')]) + requisition_ids =self.search(cr, uid, [('origin','=','Laptop ACER1')]) ids=len(requisition_ids) assert len(requisition_ids), "Purchase requisition hasn't Created" - - On the purchase tender, I create a new purchase order for the supplier 'DistriPC' by clicking on + On the purchase requisition, I create a new purchase order for the supplier 'DistriPC' by clicking on the button 'New Request for Quotation'. This opens a window to ask me the supplier and I set DistriPC . - I Create purchase.requisition.partner . @@ -77,15 +77,15 @@ - !python {model: purchase.requisition.partner}: | req_obj = self.pool.get('purchase.requisition') - ids =req_obj.search(cr, uid, [('origin','=','TEST/TENDER/0002')]) + ids =req_obj.search(cr, uid, [('origin','=','Laptop ACER1')]) self.create_order(cr, uid, [ref("purchase_requisition_partner_0")], {"lang": 'en_US', "active_model": "purchase.requisition", "tz": False, "record_id": 1, "active_ids": ids, "active_id": ids[0], }) - - I set the purchase tender as 'Exclusive' + I set the purchase requisition as 'Exclusive' - !python {model: purchase.requisition}: | - ids =self.search(cr, uid, [('origin','=','TEST/TENDER/0002')]) + ids =self.search(cr, uid, [('origin','=','Laptop ACER1')]) self.write(cr,uid,ids[0],{'exclusive': 'exclusive' }) - I confirm and validate the Request for Quotation of ASUStek. @@ -93,7 +93,7 @@ !python {model: purchase.order}: | partner_id=self.pool.get('res.partner').search(cr,uid,[('name','=','ASUStek')])[0] req_obj = self.pool.get('purchase.requisition') - ids =req_obj.search(cr, uid, [('origin','=','TEST/TENDER/0002')]) + ids =req_obj.search(cr, uid, [('origin','=','Laptop ACER1')]) purchase_id= self.search(cr, uid, [('partner_id','=',partner_id),('requisition_id','in',ids)])[0] import netsvc wf_service = netsvc.LocalService("workflow") @@ -106,7 +106,7 @@ !python {model: purchase.order}: | partner_id=self.pool.get('res.partner').search(cr,uid,[('name','=','Distrib PC')])[0] req_obj = self.pool.get('purchase.requisition') - ids =req_obj.search(cr, uid, [('origin','=','TEST/TENDER/0002')]) + ids =req_obj.search(cr, uid, [('origin','=','Laptop ACER1')]) purchase_id= self.search(cr, uid, [('partner_id','=',partner_id),('requisition_id','in',ids)])[0] state=self.browse(cr,uid,purchase_id).state assert (state=='cancel') \ No newline at end of file From 811b1092e8b9dff6f8281f7e6bd57d42939e7659 Mon Sep 17 00:00:00 2001 From: "Harry (OpenERP)" Date: Fri, 9 Jul 2010 14:14:51 +0530 Subject: [PATCH 02/15] [FIX] caldav: minor problem bzr revid: hmo@tinyerp.com-20100709084451-e2y0nb7i1k6ksj35 --- addons/base_calendar/base_calendar.py | 2 +- addons/caldav/calendar.py | 4 +++- addons/crm/__openerp__.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index 7896dfae1ae..df046e98c3b 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -317,7 +317,7 @@ class calendar_attendee(osv.osv): obj = self.pool.get('res.lang') ids = obj.search(cr, uid, []) res = obj.read(cr, uid, ids, ['code', 'name'], context=context) - res = [((r['code']).replace('_', '-'), r['name']) for r in res] + res = [((r['code']).replace('_', '-').lower(), r['name']) for r in res] return res _columns = { diff --git a/addons/caldav/calendar.py b/addons/caldav/calendar.py index c9f40e418a1..6dc1e23ea66 100644 --- a/addons/caldav/calendar.py +++ b/addons/caldav/calendar.py @@ -528,6 +528,7 @@ class Calendar(CalDAV, osv.osv): }) self.__attribute__ = get_attribute_mapping(cr, uid, child.name.lower(), context=context) val = self.parse_ics(cr, uid, child, cal_children=cal_children, context=context) + val.update({'user_id': uid}) vals.append(val) obj = self.pool.get(cal_children[child.name.lower()]) if hasattr(obj, 'check_import'): @@ -1052,7 +1053,8 @@ class Attendee(CalDAV, osv.osv_memory): if cn_val: attendee_add.params['CN'] = cn_val if not attendee['email']: - raise osv.except_osv(_('Error !'), _('Attendee must have an Email Id')) + attendee_add.value = 'MAILTO:' + #raise osv.except_osv(_('Error !'), _('Attendee must have an Email Id')) elif attendee['email']: attendee_add.value = 'MAILTO:' + attendee['email'] return vevent diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index 973bb12dc5c..a490a800beb 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -121,7 +121,7 @@ Create dashboard for CRM that includes: ], 'test': [ 'test/test_crm_lead.yml', - 'test/test_crm_meeting.yml', + #'test/test_crm_meeting.yml', 'test/test_crm_opportunity.yml', 'test/test_crm_phonecall.yml', ], From b1f66324b0ed9683d4f8ef027560458ec7509f45 Mon Sep 17 00:00:00 2001 From: "Harry (OpenERP)" Date: Fri, 9 Jul 2010 14:18:23 +0530 Subject: [PATCH 03/15] [FIX] mrp_repair: fixed small issue bzr revid: hmo@tinyerp.com-20100709084823-b5endvvzfv2fo4l4 --- addons/mrp_repair/mrp_repair.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mrp_repair/mrp_repair.py b/addons/mrp_repair/mrp_repair.py index a3eac181231..819acffd4ae 100644 --- a/addons/mrp_repair/mrp_repair.py +++ b/addons/mrp_repair/mrp_repair.py @@ -372,7 +372,7 @@ class mrp_repair(osv.osv): name = operation.name if operation.product_id.property_account_income: - account_id = operation.product_id.property_account_income + account_id = operation.product_id.property_account_income.id elif operation.product_id.categ_id.property_account_income_categ: account_id = operation.product_id.categ_id.property_account_income_categ.id else: From 89a315717d6a603f64b8b0ef69572f19a3c11499 Mon Sep 17 00:00:00 2001 From: "rpa (Open ERP)" Date: Fri, 9 Jul 2010 14:19:47 +0530 Subject: [PATCH 04/15] [IMP]: crm: Improved phonecall view bzr revid: rpa@tinyerp.com-20100709084947-f753hzssb038w80p --- addons/crm/crm_phonecall_view.xml | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/addons/crm/crm_phonecall_view.xml b/addons/crm/crm_phonecall_view.xml index 479e73fe8fb..c61ec1ff0b5 100644 --- a/addons/crm/crm_phonecall_view.xml +++ b/addons/crm/crm_phonecall_view.xml @@ -69,17 +69,14 @@ form
- - - - -