diff --git a/addons/crm/report/crm_lead_report_view.xml b/addons/crm/report/crm_lead_report_view.xml index b9119325c52..5292b297c89 100644 --- a/addons/crm/report/crm_lead_report_view.xml +++ b/addons/crm/report/crm_lead_report_view.xml @@ -43,7 +43,7 @@ - + @@ -69,79 +69,79 @@ - + crm.lead.report.select crm.lead.report search - + + domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"/> - + - - - - - - - - + string="Current" + domain="[('state','in',('draft','open')]"/> + + + + + + + + + domain="[]" context="{'group_by':'user_id'}" /> + domain="[]" + context="{'group_by':'section_id'}" /> + domain="[]" context="{'group_by':'categ_id'}" /> + domain="[]" context="{'group_by':'state'}" /> + domain="[]" + context="{'group_by':'company_id'}" /> + domain="[]" context="{'group_by':'day'}"/> + domain="[]" context="{'group_by':'month'}" /> + domain="[]" context="{'group_by':'name'}" /> - + - + @@ -150,9 +150,9 @@ - + - + crm.lead.report.tree crm.lead.report tree @@ -207,7 +207,7 @@ - + Opportunities Analysis crm.lead.report form diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 1b31ccc11fd..139082d6d75 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -148,20 +148,22 @@ class purchase_order(osv.osv): return res _columns = { - 'name': fields.char('Order Reference', size=64, required=True, select=True), - 'origin': fields.char('Source Document', size=64, + 'name': fields.char('Order Reference', size=64, required=True, select=True, states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',True)]}), + 'origin': fields.char('Source Document', size=64, states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',True)]}, help="Reference of the document that generated this purchase order request." ), - 'partner_ref': fields.char('Supplier Reference', size=64), + 'partner_ref': fields.char('Supplier Reference', states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',True)]}, size=64), 'date_order':fields.date('Date Ordered', required=True, states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)]}, help="Date on which this document has been created."), 'date_approve':fields.date('Date Approved', readonly=1), 'partner_id':fields.many2one('res.partner', 'Supplier', required=True, states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',True)]}, change_default=True), - 'partner_address_id':fields.many2one('res.partner.address', 'Address', required=True, states={'posted':[('readonly',True)]}), - 'dest_address_id':fields.many2one('res.partner.address', 'Destination Address', states={'posted':[('readonly',True)]}, + 'partner_address_id':fields.many2one('res.partner.address', 'Address', required=True, + states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',True)]}), + 'dest_address_id':fields.many2one('res.partner.address', 'Destination Address', + states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',True)]}, help="Put an address if you want to deliver directly from the supplier to the customer." \ "In this case, it will remove the warehouse link and set the customer location." ), - 'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse', states={'posted':[('readonly',True)]}), + 'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse', states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',True)]}), 'location_id': fields.many2one('stock.location', 'Destination', required=True, domain=[('usage','<>','view')]), 'pricelist_id':fields.many2one('product.pricelist', 'Pricelist', required=True, states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',True)]}, help="The pricelist sets the currency used for this purchase order. It also computes the supplier price for the selected products/quantities."), 'state': fields.selection([('draft', 'Request for Quotation'), ('wait', 'Waiting'), ('confirmed', 'Waiting Supplier Ack'), ('approved', 'Approved'),('except_picking', 'Shipping Exception'), ('except_invoice', 'Invoice Exception'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', readonly=True, help="The state of the purchase order or the quotation request. A quotation is a purchase order in a 'Draft' state. Then the order has to be confirmed by the user, the state switch to 'Confirmed'. Then the supplier must confirm the order to change the state to 'Approved'. When the purchase order is paid and received, the state becomes 'Done'. If a cancel action occurs in the invoice or in the reception of goods, the state becomes in exception.", select=True), @@ -180,7 +182,7 @@ class purchase_order(osv.osv): "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." ), - 'minimum_planned_date':fields.function(_minimum_planned_date, fnct_inv=_set_minimum_planned_date, method=True,store=True, string='Expected Date', type='datetime', help="This is computed as the minimum scheduled date of all purchase order lines' products."), + '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', store={ 'purchase.order.line': (_get_order, None, 10), @@ -596,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.datetime('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), diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml index c7f426703da..4e5bdc8a4ab 100644 --- a/addons/purchase/purchase_view.xml +++ b/addons/purchase/purchase_view.xml @@ -29,15 +29,11 @@ - - - + - + @@ -108,17 +104,16 @@ - + - - + @@ -174,12 +169,11 @@ - - - - + + - + + @@ -259,7 +253,6 @@ - - - - @@ -352,7 +342,7 @@ --> - Lines To Invoices + Purchase Lines not Invoiced ir.actions.act_window purchase.order.line [('state','in',('confirmed','done')), ('invoiced','=',False)] diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml index 6eb06738c99..63f85bea573 100644 --- a/addons/sale/sale_view.xml +++ b/addons/sale/sale_view.xml @@ -110,10 +110,10 @@
- - - + + + @@ -264,8 +264,9 @@ - - + + + diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 2285dd21aa4..0393cef5634 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1868,6 +1868,7 @@ class stock_move(osv.osv): 'partner_id': partner_id, })] return lines + def unlink(self, cr, uid, ids, context=None): if context is None: context = {} diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index 3d55ea1c324..c0abb937d29 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -955,7 +955,7 @@ calendar - + # # Sending Products @@ -1347,7 +1347,7 @@ calendar - + stock.picking.internal.search @@ -1386,7 +1386,7 @@ {'contact_display': 'partner',"search_default_confirmed":1} - + stock.move.tree