From 310e834346c54ab6e6169d575c6bae7e86eb62ab Mon Sep 17 00:00:00 2001 From: Thibault Francois Date: Tue, 19 Oct 2010 11:11:03 +0200 Subject: [PATCH 01/10] [IMP] sale purchase : fix usability bzr revid: tfr@openerp.com-20101019091103-7pssapvadbyw31wc --- addons/account_voucher/account_voucher.py | 2 + addons/purchase/purchase.py | 6 +- addons/purchase/purchase_view.xml | 22 +++-- .../purchase/wizard/purchase_line_invoice.py | 86 ++++++++++++++----- addons/sale/sale_view.xml | 2 +- 5 files changed, 83 insertions(+), 35 deletions(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 1760978b8c2..a2dc4256eba 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -501,6 +501,8 @@ class account_voucher(osv.osv): def proforma_voucher(self, cr, uid, ids, context=None): self.action_move_line_create(cr, uid, ids, context=context) return True + #return {'type' : 'ir.actions.act_window_close' } + def action_cancel_draft(self, cr, uid, ids, context={}): wf_service = netsvc.LocalService("workflow") diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 91b361c19ee..62e477642c3 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -187,7 +187,7 @@ class purchase_order(osv.osv): help="From Order: a draft invoice will be pre-generated based on the purchase order. The accountant " \ "will just have to validate this invoice for control.\n" \ "From Picking: a draft invoice will be pre-generated based on validated receptions.\n" \ - "Manual: no invoice will be pre-generated. The accountant will have to encode manually." + "Manual: allows you to generate suppliers invoices by chosing in the uninvoiced lines of all manual purchase orders." ), 'minimum_planned_date':fields.function(_minimum_planned_date, fnct_inv=_set_minimum_planned_date, method=True,store=True, string='Expected Date', type='date', help="This is computed as the minimum scheduled date of all purchase order lines' products."), 'amount_untaxed': fields.function(_amount_all, method=True, digits_compute= dp.get_precision('Purchase Price'), string='Untaxed Amount', @@ -598,7 +598,7 @@ class purchase_order_line(osv.osv): _columns = { 'name': fields.char('Description', size=256, required=True), 'product_qty': fields.float('Quantity', required=True, digits=(16,2)), - 'date_planned': fields.date('Scheduled date', required=True), + 'date_planned': fields.date('Scheduled Date', required=True), 'taxes_id': fields.many2many('account.tax', 'purchase_order_taxe', 'ord_id', 'tax_id', 'Taxes'), 'product_uom': fields.many2one('product.uom', 'Product UOM', required=True), 'product_id': fields.many2one('product.product', 'Product', domain=[('purchase_ok','=',True)], change_default=True), @@ -617,7 +617,7 @@ class purchase_order_line(osv.osv): \n* The \'Cancelled\' state is set automatically when user cancel purchase order.'), 'invoice_lines': fields.many2many('account.invoice.line', 'purchase_order_line_invoice_rel', 'order_line_id', 'invoice_id', 'Invoice Lines', readonly=True), 'invoiced': fields.boolean('Invoiced', readonly=True), - 'partner_id': fields.related('order_id','partner_id',string='Partner',readonly=True,type="many2one", relation="res.partner"), + 'partner_id': fields.related('order_id','partner_id',string='Partner',readonly=True,type="many2one", relation="res.partner", store=True), 'date_order': fields.related('order_id','date_order',string='Order Date',readonly=True,type="date") } diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml index f825a11cac5..685037ccd37 100644 --- a/addons/purchase/purchase_view.xml +++ b/addons/purchase/purchase_view.xml @@ -41,7 +41,7 @@ parent="base.menu_purchase_root" sequence="4"/> + groups="base.group_extended"/> @@ -144,10 +144,10 @@