From c7166b7fdb29ac98bc8bdffe8f3f15f8fef5134c Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Fri, 2 Mar 2012 12:17:09 +0530 Subject: [PATCH 001/107] [FIX]Sale:Simplify the picking and the invoice policy on Sale order edit order policy and set invoice on as per needed bzr revid: sgo@tinyerp.com-20120302064709-430idkcoq18t6q4x --- addons/sale/__openerp__.py | 2 +- addons/sale/sale.py | 18 ++++++++---------- addons/sale/sale_demo.xml | 8 ++++---- addons/sale/sale_view.xml | 2 +- addons/sale/sale_workflow.xml | 2 +- 5 files changed, 15 insertions(+), 17 deletions(-) diff --git a/addons/sale/__openerp__.py b/addons/sale/__openerp__.py index ff2cfb03f5f..04a9d1a2ef6 100644 --- a/addons/sale/__openerp__.py +++ b/addons/sale/__openerp__.py @@ -91,7 +91,7 @@ Dashboard for Sales Manager that includes: 'test/sale_order_demo.yml', 'test/picking_order_policy.yml', 'test/manual_order_policy.yml', - 'test/postpaid_order_policy.yml', + #'test/postpaid_order_policy.yml', 'test/prepaid_order_policy.yml', 'test/cancel_order.yml', 'test/delete_order.yml', diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 82bfda7b580..3274781a9f7 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -223,16 +223,14 @@ class sale_order(osv.osv): 'picking_policy': fields.selection([('direct', 'Deliver each product when available'), ('one', 'Deliver all products at once')], 'Picking Policy', required=True, readonly=True, states={'draft': [('readonly', False)]}, help="""If you don't have enough stock available to deliver all at once, do you accept partial shipments or not?"""), 'order_policy': fields.selection([ - ('prepaid', 'Pay before delivery'), - ('manual', 'Deliver & invoice on demand'), - ('picking', 'Invoice based on deliveries'), - ('postpaid', 'Invoice on order after delivery'), - ], 'Invoice Policy', required=True, readonly=True, states={'draft': [('readonly', False)]}, - help="""The Invoice Policy is used to synchronise invoice and delivery operations. - - The 'Pay before delivery' choice will first generate the invoice and then generate the picking order after the payment of this invoice. - - The 'Deliver & Invoice on demand' will create the picking order directly and wait for the user to manually click on the 'Invoice' button to generate the draft invoice based on the sale order or the sale order lines. - - The 'Invoice on order after delivery' choice will generate the draft invoice based on sales order after all picking lists have been finished. - - The 'Invoice based on deliveries' choice is used to create an invoice during the picking process."""), + ('prepaid', 'Before Delivery'), + ('manual', 'On Demand'), + ('picking', 'On Delivery Order'), + ], 'Create Invoice', required=True, readonly=True, states={'draft': [('readonly', False)]}, + help="""The Create Invoice is used to synchronise invoice and delivery operations. + - The 'Before Delivery' choice will first generate the invoice and then generate the picking order after the payment of this invoice. + - The 'On Demand' will create the picking order directly and wait for the user to manually click on the 'Invoice' button to generate the draft invoice based on the sale order or the sale order lines. + - The 'On Delivery Order' choice will generate the draft invoice based on sales order after all picking lists have been finished."""), 'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', required=True, readonly=True, states={'draft': [('readonly', False)]}, help="Pricelist for current sales order."), 'project_id': fields.many2one('account.analytic.account', 'Contract/Analytic Account', readonly=True, states={'draft': [('readonly', False)]}, help="The analytic account related to a sales order."), diff --git a/addons/sale/sale_demo.xml b/addons/sale/sale_demo.xml index 5da496a1c4b..3b5c4c46b3a 100644 --- a/addons/sale/sale_demo.xml +++ b/addons/sale/sale_demo.xml @@ -61,7 +61,7 @@ - + - + diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml index 90d3838f5a0..e26e3d34560 100644 --- a/addons/sale/sale_view.xml +++ b/addons/sale/sale_view.xml @@ -222,7 +222,7 @@ - + diff --git a/addons/sale/sale_workflow.xml b/addons/sale/sale_workflow.xml index 0ff5eb15ea0..78284ee1eb1 100644 --- a/addons/sale/sale_workflow.xml +++ b/addons/sale/sale_workflow.xml @@ -172,7 +172,7 @@ - (order_policy=='prepaid') or ((order_policy=='postpaid') and shipped) + (order_policy=='prepaid') From 17865d58f09d4dca1d22e4dded0f8fbbdd179284 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Mon, 5 Mar 2012 11:01:26 +0530 Subject: [PATCH 002/107] [IMP]Sale:inisible invoice_quantity sale bzr revid: sgo@tinyerp.com-20120305053126-x86etpu68px7gq89 --- addons/sale/sale_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml index e26e3d34560..b2a97f78a21 100644 --- a/addons/sale/sale_view.xml +++ b/addons/sale/sale_view.xml @@ -222,7 +222,7 @@ - + From 9d3411ee548eacacae3363f5b921fe9eee1c5ee9 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Tue, 6 Mar 2012 12:03:02 +0530 Subject: [PATCH 003/107] [IMP]remove comments unused code bzr revid: sgo@tinyerp.com-20120306063302-thlryjejp9idkjq3 --- addons/sale/__openerp__.py | 1 - addons/sale/sale.py | 2 +- addons/sale/sale_demo.xml | 36 --------------- addons/sale/test/postpaid_order_policy.yml | 54 ---------------------- 4 files changed, 1 insertion(+), 92 deletions(-) delete mode 100644 addons/sale/test/postpaid_order_policy.yml diff --git a/addons/sale/__openerp__.py b/addons/sale/__openerp__.py index 04a9d1a2ef6..7e0139ba749 100644 --- a/addons/sale/__openerp__.py +++ b/addons/sale/__openerp__.py @@ -91,7 +91,6 @@ Dashboard for Sales Manager that includes: 'test/sale_order_demo.yml', 'test/picking_order_policy.yml', 'test/manual_order_policy.yml', - #'test/postpaid_order_policy.yml', 'test/prepaid_order_policy.yml', 'test/cancel_order.yml', 'test/delete_order.yml', diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 3274781a9f7..198d1d57935 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -221,7 +221,7 @@ class sale_order(osv.osv): 'incoterm': fields.many2one('stock.incoterms', 'Incoterm', help="Incoterm which stands for 'International Commercial terms' implies its a series of sales terms which are used in the commercial transaction."), 'picking_policy': fields.selection([('direct', 'Deliver each product when available'), ('one', 'Deliver all products at once')], - 'Picking Policy', required=True, readonly=True, states={'draft': [('readonly', False)]}, help="""If you don't have enough stock available to deliver all at once, do you accept partial shipments or not?"""), + 'Picking Ship', required=True, readonly=True, states={'draft': [('readonly', False)]}, help="""If you don't have enough stock available to deliver all at once, do you accept partial shipments or not?"""), 'order_policy': fields.selection([ ('prepaid', 'Before Delivery'), ('manual', 'On Demand'), diff --git a/addons/sale/sale_demo.xml b/addons/sale/sale_demo.xml index 3b5c4c46b3a..990c76a5242 100644 --- a/addons/sale/sale_demo.xml +++ b/addons/sale/sale_demo.xml @@ -61,42 +61,6 @@ - - - - - - - - diff --git a/addons/sale/test/postpaid_order_policy.yml b/addons/sale/test/postpaid_order_policy.yml deleted file mode 100644 index eeea02e2305..00000000000 --- a/addons/sale/test/postpaid_order_policy.yml +++ /dev/null @@ -1,54 +0,0 @@ -- - Now I confirm the Quotation with "Invoice on order after delivery" policy. -- - !workflow {model: sale.order, action: order_confirm, ref: order2} -- - I check that related delivery order after confirmed. -- - !python {model: sale.order}: | - sale_order = self.browse(cr, uid, ref("order2")) - assert sale_order.picking_ids, "Delivery Order should be created." - assert len(sale_order.invoice_ids) == False, "Invoice should be not created." -- - Now, I dispatch delivery order. -- - !python {model: stock.partial.picking}: | - order = self.pool.get('sale.order').browse(cr, uid, ref("order2")) - for pick in order.picking_ids: - data = pick.force_assign() - if data == True: - partial_id = self.create(cr, uid, {}, context={'active_model': 'stock.picking','active_ids': [pick.id]}) - self.do_partial(cr, uid, [partial_id]) -- - I open the invoice. -- - !python {model: sale.order}: | - import netsvc - wf_service = netsvc.LocalService("workflow") - order = self.browse(cr, uid, ref("order2")) - #assert order.invoice_ids, "Invoice should be created after dispatch delivery order." - for invoice in order.invoice_ids: - wf_service.trg_validate(uid, 'account.invoice', invoice.id, 'invoice_open', cr) -- - I pay the invoice. -- - !python {model: account.invoice}: | - sale_order = self.pool.get('sale.order') - order = sale_order.browse(cr, uid, ref("order2")) - journal_ids = self.pool.get('account.journal').search(cr, uid, [('type', '=', 'cash'), ('company_id', '=', order.company_id.id)], limit=1) - for invoice in order.invoice_ids: - invoice.pay_and_reconcile( - invoice.amount_total, ref('account.cash'), ref('account.period_8'), - journal_ids[0], ref('account.cash'), - ref('account.period_8'), journal_ids[0], - name='test') -- - I check that an order has been invoiced, shipped and closed. -- - !python {model: sale.order}: | - order = self.browse(cr, uid, ref("order2")) - assert order.picked_rate == 100, "Shipment progress is not 100%." - #assert order.shipped, "Delivery Order should be dispatch." #TOFIX: procurement is gone in idle state so order never shipped, invoiced. after install mrp, it will be normal. - #assert order.invoiced == True, "Sale order is not invoiced." - #assert order.invoiced_rate == 100, "Invoiced progress is not 100%." - #assert order.state == 'done', 'Order should be in closed.' From 2cc824e2c2e6b471ae2db051d1c3134f58f79f2a Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Tue, 6 Mar 2012 12:31:06 +0530 Subject: [PATCH 004/107] [IMP]minor changes bzr revid: sgo@tinyerp.com-20120306070106-r8bm18vpqahgr865 --- addons/sale/sale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 198d1d57935..53fd2227bd9 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -221,7 +221,7 @@ class sale_order(osv.osv): 'incoterm': fields.many2one('stock.incoterms', 'Incoterm', help="Incoterm which stands for 'International Commercial terms' implies its a series of sales terms which are used in the commercial transaction."), 'picking_policy': fields.selection([('direct', 'Deliver each product when available'), ('one', 'Deliver all products at once')], - 'Picking Ship', required=True, readonly=True, states={'draft': [('readonly', False)]}, help="""If you don't have enough stock available to deliver all at once, do you accept partial shipments or not?"""), + 'Ship Policy', required=True, readonly=True, states={'draft': [('readonly', False)]}, help="""If you don't have enough stock available to deliver all at once, do you accept partial shipments or not?"""), 'order_policy': fields.selection([ ('prepaid', 'Before Delivery'), ('manual', 'On Demand'), From fa3f4f180f533f3f21cf072f0e48d1a64c8e3296 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Thu, 15 Mar 2012 12:03:41 +0530 Subject: [PATCH 005/107] [IMP]Add demo data record which is deleted bzr revid: sgo@tinyerp.com-20120315063341-7jsvfbttbsrvpw0v --- addons/sale/sale_demo.xml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/addons/sale/sale_demo.xml b/addons/sale/sale_demo.xml index 990c76a5242..64dcaf89c9c 100644 --- a/addons/sale/sale_demo.xml +++ b/addons/sale/sale_demo.xml @@ -61,6 +61,42 @@ + + + + + + + + + order + prepaid + + + + + + + + [PC2] Computer assembled on demand + + + 540 + make_to_order + + + + [MB1] Mainboard ASUStek (purchased on order) + + + 88 + 8 + 8 + make_to_order + + + + From df88a14aa9cc65227c0be513371af75396324422 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Fri, 16 Mar 2012 16:14:06 +0530 Subject: [PATCH 006/107] [IMP]state fields are added in aplicant kanban view. bzr revid: kbh@tinyerp.com-20120316104406-taz2wokz7urbyeyi --- addons/hr_recruitment/hr_recruitment_view.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index 69a7c104073..c188365b416 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -339,7 +339,9 @@
From dc7371ad56bfad0823ef6967718889ae935cb074 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Fri, 16 Mar 2012 17:07:33 +0530 Subject: [PATCH 007/107] [IMP]states changed. bzr revid: kbh@tinyerp.com-20120316113733-r8qgjwh27ffjdf87 --- addons/hr_recruitment/hr_recruitment_view.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index c188365b416..15155a318cc 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -339,9 +339,9 @@

From 01bfed053b4a0d204eee9b8ef9b26e7337a54e73 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Fri, 16 Mar 2012 17:45:25 +0530 Subject: [PATCH 008/107] [IMP]:hr_recruitment:improved state in Refuse and Hire buttons bzr revid: apa@tinyerp.com-20120316121525-o2rt3i5gd9u5h6z9 --- addons/hr_recruitment/hr_recruitment_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index 026a94c2ec9..2515045a7d3 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -341,8 +341,8 @@

From 583c11eba017f208d097712319daa4ccd6aae4ac Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Fri, 16 Mar 2012 18:21:23 +0530 Subject: [PATCH 009/107] [FIX]Can Constitute an Expense ? set as a true when creating from hr_expense bzr revid: sgo@tinyerp.com-20120316125123-28u9weolcszgexms --- addons/hr_expense/hr_expense_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_expense/hr_expense_view.xml b/addons/hr_expense/hr_expense_view.xml index 23883b79838..0103e13628d 100644 --- a/addons/hr_expense/hr_expense_view.xml +++ b/addons/hr_expense/hr_expense_view.xml @@ -81,7 +81,7 @@
- + From 0b2d045f91c56751d517bd8fb5dda377ac0b6111 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Fri, 16 Mar 2012 18:41:11 +0530 Subject: [PATCH 010/107] [IMP]hr_holidays: improve in hr holidays form view and list view as per suggestion and reform warning bzr revid: sgo@tinyerp.com-20120316131111-agud3dotpourl7uy --- addons/hr_holidays/hr_holidays.py | 2 +- addons/hr_holidays/hr_holidays_view.xml | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py index 3bb7a8e4982..b4127d83773 100644 --- a/addons/hr_holidays/hr_holidays.py +++ b/addons/hr_holidays/hr_holidays.py @@ -341,7 +341,7 @@ class hr_holidays(osv.osv): if record.employee_id and not record.holiday_status_id.limit: leaves_rest = holi_status_obj.get_days( cr, uid, [record.holiday_status_id.id], record.employee_id.id, False)[record.holiday_status_id.id]['remaining_leaves'] if leaves_rest < record.number_of_days_temp: - raise osv.except_osv(_('Warning!'),_('You cannot validate leaves for employee %s: too few remaining days (%s).') % (record.employee_id.name, leaves_rest)) + raise osv.except_osv(_('Warning!'),_('There are no %s allocated for employee %s, Please create allocation request for this leave type.') % (record.holiday_status_id.name,record.employee_id.name)) return True hr_holidays() diff --git a/addons/hr_holidays/hr_holidays_view.xml b/addons/hr_holidays/hr_holidays_view.xml index 22d4d6e567d..e52124bf4c5 100644 --- a/addons/hr_holidays/hr_holidays_view.xml +++ b/addons/hr_holidays/hr_holidays_view.xml @@ -65,18 +65,18 @@ - + - + - + @@ -150,8 +150,8 @@ tree - + @@ -231,21 +231,21 @@ tree - - - - + - + + + + + - -