[MERGE]: Merge with lp:openobject-addons
authorrpa (Open ERP) <rpa@tinyerp.com>
Thu, 27 May 2010 05:14:02 +0000 (10:44 +0530)
committerrpa (Open ERP) <rpa@tinyerp.com>
Thu, 27 May 2010 05:14:02 +0000 (10:44 +0530)
bzr revid: rpa@tinyerp.com-20100526050851-lodfvwj5ruw6rbs0
bzr revid: rpa@tinyerp.com-20100526122202-vp53qayvu46vvkve
bzr revid: rpa@tinyerp.com-20100527051402-mrkzkwazlhosynk2

1  2 
addons/crm/__openerp__.py
addons/crm/crm_lead_view.xml
addons/crm/crm_opportunity_view.xml
addons/document/__openerp__.py
addons/product/product.py
addons/product/product_view.xml
addons/sale/sale.py
addons/sale/sale_view.xml
addons/stock/stock_view.xml

@@@ -32,12 -32,12 +32,12 @@@ assignment, resolution and notification
  
  Open ERP ensures that all cases are successfully tracked by users, customers and
  suppliers. It can automatically send reminders, escalate the request, trigger
- specific methods and lots of others actions based on your enterprise own rules.
+ specific methods and lots of other actions based on your own enterprise rules.
  
  The greatest thing about this system is that users don't need to do anything
  special. They can just send email to the request tracker. Open ERP will take
  care of thanking them for their message, automatically routing it to the
- appropriate staff, and making sure all future correspondence gets to the right
+ appropriate staff, and make sure all future correspondence gets to the right
  place.
  
  The CRM module has a email gateway for the synchronisation interface
@@@ -108,13 -108,13 +108,13 @@@ between mails and Open ERP."""
          'crm_phonecall_demo.xml'
      ],
      'test': [
 -#            'test/test_crm_lead.yml', 
 -#            'test/test_crm_meeting.yml', 
 -#            'test/test_crm_opportunity.yml', 
 -#            'test/test_crm_phonecall.yml', 
 -             ], 
 -    'installable': True, 
 -    'active': False, 
 +            'test/test_crm_lead.yml',
 +            'test/test_crm_meeting.yml',
 +            'test/test_crm_opportunity.yml',
 +            'test/test_crm_phonecall.yml',
 +             ],
 +    'installable': True,
 +    'active': False,
      'certificate': '0079056041421',
  }
  # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@@ -2,7 -2,7 +2,7 @@@
  <openerp>
  <data>
  
- <!--Lead Stage Form view -->
+       <!--Lead Stage Form view -->
  
      <record id="crm_lead_stage_act" model="ir.actions.act_window">
          <field name="name">Lead Stages</field>
@@@ -16,7 -16,7 +16,7 @@@
          groups="base.group_extended"
          parent="crm.menu_crm_case_stage" />
  
-     <!--  Resource Type Form View -->
+       <!--  Resource Type Form View -->
  
          <record id="crm_lead_resource_act" model="ir.actions.act_window">
              <field name="name">Lead Resource Type</field>
@@@ -31,7 -31,7 +31,7 @@@
              groups="base.group_extended"
              parent="crm.menu_crm_case_resource_type" />
  
- <!-- CRM Lead Form View  -->
+               <!-- CRM Lead Form View  -->
  
          <record model="ir.ui.view" id="crm_case_form_view_leads">
          <field name="name">CRM - Leads Form</field>
@@@ -47,9 -47,8 +47,9 @@@
                           name="convert_opportunity"
                           string="Convert"
                           help="Convert to Opportunity"
 -                         icon="gtk-index"
 -                         type="object"/>
 +                         icon="gtk-index"   
 +                         type="object"
 +                         attrs="{'invisible':[('opportunity_id','!=',False)]}"/>
                      <newline />
                      <field name="section_id" colspan="1"
                          widget="selection" />
          </field>
      </record>
  
- <!-- CRM Lead Tree View -->
+       <!-- CRM Lead Tree View -->
  
      <record model="ir.ui.view" id="crm_case_tree_view_leads">
          <field name="name">CRM - Leads Tree</field>
          </field>
      </record>
  
- <!-- CRM Lead Calendar View -->
+       <!-- CRM Lead Calendar View -->
  
      <record model="ir.ui.view" id="crm_case_calendar_view_leads">
          <field name="name">CRM - Leads Calendar</field>
          </field>
      </record>
  
- <!-- CRM Lead Search View -->
+       <!-- CRM Lead Search View -->
  
      <record id="view_crm_case_leads_filter" model="ir.ui.view">
          <field name="name">CRM - Leads Search</field>
                          help="Show Sales Team"/>
                  </field>
                  <newline/>
-                 <group expand="0" string="Group By..." colspan="14">
+                 <group expand="1" string="Group By...">
                      <filter string="Stage" icon="terp-crm" domain="[]" context="{'group_by':'stage_id'}"/>
                      <filter string="State" icon="terp-crm" domain="[]" context="{'group_by':'state'}"/>
                      <filter string="Source" icon="terp-crm" domain="[]" context="{'group_by':'categ_id'}"/>
          </field>
      </record>
  
  </data>
  </openerp>
@@@ -2,7 -2,7 +2,7 @@@
  <openerp>
  <data>
  
- <!-- Opportunity Categories Form View -->
+       <!-- Opportunity Categories Form View -->
  
      <record id="crm_opportunity_categ_action" model="ir.actions.act_window">
          <field name="name">Opportunity Categories</field>
@@@ -17,7 -17,7 +17,7 @@@
          id="menu_crm_case_opportunity-act"
          parent="crm.menu_crm_case_categ" />
  
- <!-- Opportunity Stages Form View-->
+               <!-- Opportunity Stages Form View-->
  
          <record id="crm_opportunity_stage_act" model="ir.actions.act_window">
              <field name="name">Opportunity Stages</field>
@@@ -32,7 -32,7 +32,7 @@@
              id="menu_crm_opportunity_stage_act"
              parent="crm.menu_crm_case_stage" />
  
- <!-- Opportunity Resource Type Form View -->
+               <!-- Opportunity Resource Type Form View -->
  
          <record id="crm_opportunity_resource_act" model="ir.actions.act_window">
              <field name="name">Opportunity Resource Type</field>
@@@ -47,7 -47,7 +47,7 @@@
              id="menu_crm_opportunity_resource_act"
              parent="crm.menu_crm_case_resource_type" />
  
- <!-- Opportunities Form View -->
+       <!-- Opportunities Form View -->
  
      <record model="ir.ui.view" id="crm_case_form_view_oppor">
          <field name="name">Opportunities</field>
          </field>
      </record>
  
- <!-- Opportunities Tree View -->
+       <!-- Opportunities Tree View -->
  
      <record model="ir.ui.view" id="crm_case_tree_view_oppor">
          <field name="name">Opportunities Tree</field>
          </field>
      </record>
  
- <!-- Opportunities Graph View -->
+       <!-- Opportunities Graph View -->
  
      <record model="ir.ui.view" id="crm_case_graph_view_opportunity">
          <field name="name">CRM - Opportunity Graph</field>
          </field>
      </record>
  
- <!-- Opportunities Search View -->
+       <!-- Opportunities Search View -->
  
      <record id="view_crm_case_opportunities_filter" model="ir.ui.view">
          <field name="name">CRM - Opportunities Search</field>
                  <field name="name" string="Opportunity"/>
                  <field name="user_id" widget="selection">
                      <filter icon="terp-partner"
 -                        domain="[('user_id','=',uid)]"
 -                        help="My Opportunities" default="1"/>
 -                    <filter icon="terp-partner"
 -                        domain="[('user_id','=', uid)]"
 -                        help="Unassigned Opportunities"/>
 +                        domain="[('user_id','=', False)]"
 +                        help="Unassigned Opportunities" />
                  </field>
                  <field name="section_id"
                      default="context.get('section_id', False)" select="1"
                          help="My Sale Team" />
                  </field>
                  <newline/>
-                 <group expand="0" string="Group By..." colspan="16">
+                 <group expand="1" string="Group By...">
                      <filter string="Stage" icon="terp-crm" domain="[]"
-                         context="{'group_by':'stage_id'}" />
+                         context="{'group_by':'stage_id'}"/>
                      <filter string="Priority" icon="terp-crm" domain="[]"
-                         context="{'group_by':'priority'}" />
+                         context="{'group_by':'priority'}"/>
                      <filter string="Category" icon="terp-crm"
-                         domain="[]" context="{'group_by':'categ_id'}" />
+                         domain="[]" context="{'group_by':'categ_id'}"/>
  
-                     <separator orientation="vertical" />
+                     <separator orientation="vertical"/>
                      <filter string="Salesman" icon="terp-crm"
-                         domain="[('user_id','=',uid)]" context="{'group_by':'user_id'}" />
-                     <separator orientation="vertical" />
+                         domain="[('user_id','=',uid)]" context="{'group_by':'user_id'}"/>
+                     <separator orientation="vertical"/>
                      <filter string="Creation" icon="terp-project"
-                         domain="[]" context="{'group_by':'create_date'}" />
+                         domain="[]" context="{'group_by':'create_date'}"/>
                      <filter string="Exp.Closing" icon="terp-project"
-                         domain="[]" context="{'group_by':'date_deadline'}" />
+                         domain="[]" context="{'group_by':'date_deadline'}"/>
                  </group>
             </search>
          </field>
      </record>
-     
  </data>
  </openerp>
      'category': 'Generic Modules/Others',
      'description': """This is a complete document management system:
      * User Authentication
 -    * Document Indexation
 +    * Document Indexation :- .pptx and .docx files are not support in windows platform.
  
      ATTENTION:
      - When you install this module in a running company that have already PDF files stored into the database,
        you will lose them all.
-     - After installing this module PDF's are not longer stored into the database,
+     - After installing this module PDF's are no longer stored into the database,
        but in the servers rootpad like /server/bin/filestore.
  """,
      'author': 'Tiny',
@@@ -262,7 -262,7 +262,7 @@@ class product_template(osv.osv)
          'produce_delay': fields.float('Manufacturing Lead Time', help="Average time to produce this product. This is only for the production order and, if it is a multi-level bill of material, it's only for the level of this product. Different lead times will be summed for all levels and purchase orders."),
          'procure_method': fields.selection([('make_to_stock','Make to Stock'),('make_to_order','Make to Order')], 'Procurement Method', required=True, help="'Make to Stock': When needed, take from the stock or wait until re-supplying. 'Make to Order': When needed, purchase or produce for the procurement request."),
          'rental': fields.boolean('Can be Rent'),
-         'categ_id': fields.many2one('product.category','Category', required=True, change_default=True, domain="[('type','=','normal')]"),
+         'categ_id': fields.many2one('product.category','Category', required=True, change_default=True, domain="[('type','=','normal')]" ,help="Select category for the current product"),
          'list_price': fields.float('Sale Price', digits_compute=dp.get_precision('Sale Price'), help="Base price for computing the customer price. Sometimes called the catalog price."),
          'standard_price': fields.float('Cost Price', required=True, digits_compute=dp.get_precision('Account'), help="Product's cost for accounting stock valuation. It is the base price for the supplier price."),
          'volume': fields.float('Volume', help="The volume in m3."),
@@@ -446,9 -446,9 +446,9 @@@ class product_product(osv.osv)
          'outgoing_qty': fields.function(_product_outgoing_qty, method=True, type='float', string='Outgoing'),
          'price': fields.function(_product_price, method=True, type='float', string='Pricelist', digits_compute=dp.get_precision('Sale Price')),
          'lst_price' : fields.function(_product_lst_price, method=True, type='float', string='List Price', digits_compute=dp.get_precision('Sale Price')),
 -        'code': fields.function(_product_code, method=True, type='char', string='Code'),
 +        'code': fields.function(_product_code, method=True, type='char', string='Reference'),
          'partner_ref' : fields.function(_product_partner_ref, method=True, type='char', string='Customer ref'),
 -        'default_code' : fields.char('Code', size=64),
 +        'default_code' : fields.char('Reference', size=64),
          'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the product without removing it."),
          'variants': fields.char('Variants', size=64),
          'product_tmpl_id': fields.many2one('product.template', 'Product Template', required=False),
@@@ -586,7 -586,7 +586,7 @@@ class product_packaging(osv.osv)
      _rec_name = 'ean'
      _columns = {
          'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of packaging."),
-         'name' : fields.char('Description', size=64),
+         'name' : fields.text('Description', size=64),
          'qty' : fields.float('Quantity by Package',
              help="The total number of products you can put by pallet or box."),
          'ul' : fields.many2one('product.ul', 'Type of Package', required=True),
@@@ -645,9 -645,9 +645,9 @@@ class product_supplierinfo(osv.osv)
      _name = "product.supplierinfo"
      _description = "Information about a product supplier"
      _columns = {
-         'name' : fields.many2one('res.partner', 'Partner', required=True, ondelete='cascade', help="Supplier of this product"),
-         'product_name': fields.char('Partner Product Name', size=128, help="This partner's product name will be used when printing a request for quotation. Keep empty to use the internal one."),
-         'product_code': fields.char('Partner Product Code', size=64, help="This partner's product code will be used when printing a request for quotation. Keep empty to use the internal one."),
+         'name' : fields.many2one('res.partner', 'Supplier', required=True, ondelete='cascade', help="Supplier of this product"),
+         'product_name': fields.char('Supplier Product Name', size=128, help="This supplier's product name will be used when printing a request for quotation. Keep empty to use the internal one."),
+         'product_code': fields.char('Supplier Product Code', size=64, help="This supplier's product code will be used when printing a request for quotation. Keep empty to use the internal one."),
          'sequence' : fields.integer('Sequence', help="Assigns the priority to the list of product supplier."),
          'qty' : fields.float('Minimal Quantity', required=True, help="The minimal quantity to purchase to this supplier, expressed in the default unit of measure."),
          'product_id' : fields.many2one('product.template', 'Product', required=True, ondelete='cascade', select=True),
@@@ -676,20 -676,7 +676,20 @@@ class pricelist_partnerinfo(osv.osv)
      _order = 'min_quantity asc'
  pricelist_partnerinfo()
  
 +class res_users(osv.osv):
 +    _name = 'res.users'
 +    _inherit = 'res.users'
  
 +    def create(self, cr, uid, data, context={}):
 +        user_id = super(res_users, self).create(cr, uid, data, context)
 +        data_obj = self.pool.get('ir.model.data')
 +        data_id = data_obj._get_id(cr, uid, 'product', 'ir_ui_view_sc_product0')
 +        view_id  = data_obj.browse(cr, uid, data_id, context=context).res_id
 +        copy_id = self.pool.get('ir.ui.view_sc').copy(cr, uid, view_id, default = {
 +                                    'user_id': user_id}, context=context)
 +        return user_id
 +
 +res_users()
  
  # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
  
                     <field name="name"/>
                     <field name="categ_id" widget="selection" operator="child_of"/>
                     <newline/>
-                    <group col='8' colspan='14' expand="1" string="Extended options...">
-                        <field name="pricelist_id" widget="selection" context="{'pricelist': self}" />
-                    </group>
-                    <newline/>
-                    <group col='8' colspan='15' expand='1' string='Group by...'>
+                    <group  expand='1' string='Group by...' groups="base.group_extended">
                         <filter string='Category' icon="terp-stock" domain="[]" context="{'group_by' : 'categ_id'}" />
                         <separator orientation="vertical"/>
                         <filter string='Default UOM' icon="terp-stock" domain="[]" context="{'group_by' : 'uom_id'}" />
                         <separator orientation="vertical"/>
                         <filter string='Type' icon="terp-stock" domain="[]" context="{'group_by' : 'type'}" />
                     </group>
+                    <newline/>
+                    <group expand="0" string="Extended options..." groups="base.group_extended">
+                        <field name="pricelist_id" widget="selection" context="{'pricelist': self}" />
+                    </group>
                  </search>
              </field>
          </record>
  
                              <group colspan="2" col="2" name="status">
                                  <separator string="Status" colspan="2"/>
 -                                <field name="categ_id"/>
 +                                <field name="categ_id" select="1" groups="base.group_extended"/>
                                  <field name="state"/>
                                  <field groups="base.group_extended" name="product_manager"/>
                              </group>
  
                              <group colspan="2" col="2" name="uom">
-                                 <separator string="UOM" colspan="2"/>
+                                 <separator string="Unit of Measure" colspan="2"/>
                                  <field name="uom_id" on_change="onchange_uom(uom_id,uom_po_id)" widget="selection"/>
                                  <field name="uom_po_id" widget="selection"/>
                              </group>
                                      <field name="height"/>
                                      <field name="width"/>
                                      <field name="length"/>
-                                     <separator colspan="4" string="Other Info"/>
-                                     <field colspan="4" name="name"/>
+                                     <separator colspan="4" string="Description"/>
+                                     <field colspan="4" name="name" nolabel="1"/>
                                  </form>
                              </field>
                          </page>
diff --combined addons/sale/sale.py
@@@ -49,6 -49,7 +49,6 @@@ def _incoterm_get(self, cr, uid, contex
      cr.execute('select code, code||\', \'||name from stock_incoterms where active')
      return cr.fetchall()
  
 -
  class sale_order(osv.osv):
      _name = "sale.order"
      _log_create = True
          'partner_id': fields.many2one('res.partner', 'Customer', readonly=True, states={'draft': [('readonly', False)]}, required=True, change_default=True, select=True),
          'partner_invoice_id': fields.many2one('res.partner.address', 'Invoice Address', readonly=True, required=True, states={'draft': [('readonly', False)]}),
          'partner_order_id': fields.many2one('res.partner.address', 'Ordering Contact', readonly=True, required=True, states={'draft': [('readonly', False)]}, help="The name and address of the contact who requested the order or quotation."),
-         'partner_shipping_id': fields.many2one('res.partner.address', 'Shipping Address', readonly=True, required=True, states={'draft': [('readonly', False)]}),
+         'partner_shipping_id': fields.many2one('res.partner.address', 'Shipping Address', readonly=True, required=True, states={'draft': [('readonly', False)]}, help="Shipping address for current sale order"),
  
          'incoterm': fields.selection(_incoterm_get, 'Incoterm', size=3),
          'picking_policy': fields.selection([('direct', 'Partial Delivery'), ('one', 'Complete Delivery')],
    - The 'Shipping & Manual Invoice' will create the picking order directly and wait for the user to manually click on the 'Invoice' button to generate the draft invoice.
    - The 'Invoice on Order After Delivery' choice will generate the draft invoice based on sale order after all picking lists have been finished.
    - The 'Invoice from the picking' choice is used to create an invoice during the picking process."""),
-         'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', required=True, readonly=True, states={'draft': [('readonly', False)]}),
+         'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', required=True, readonly=True, states={'draft': [('readonly', False)]}, help="Pricelist version for current sale order"),
          'project_id': fields.many2one('account.analytic.account', 'Analytic Account', readonly=True, states={'draft': [('readonly', False)]}),
  
          'order_line': fields.one2many('sale.order.line', 'order_id', 'Order Lines', readonly=True, states={'draft': [('readonly', False)]}),
@@@ -823,7 -824,7 +823,7 @@@ class sale_order_line(osv.osv)
          'property_ids': fields.many2many('mrp.property', 'sale_order_line_property_rel', 'order_id', 'property_id', 'Properties', readonly=True, states={'draft':[('readonly',False)]}),
          'address_allotment_id': fields.many2one('res.partner.address', 'Allotment Partner'),
          'product_uom_qty': fields.float('Quantity (UoM)', digits=(16, 2), required=True, readonly=True, states={'draft':[('readonly',False)]}),
-         'product_uom': fields.many2one('product.uom', 'Product UoM', required=True, readonly=True, states={'draft':[('readonly',False)]}),
+         'product_uom': fields.many2one('product.uom', 'Unit of Measure ', required=True, readonly=True, states={'draft':[('readonly',False)]}),
          'product_uos_qty': fields.float('Quantity (UoS)', readonly=True, states={'draft':[('readonly',False)]}),
          'product_uos': fields.many2one('product.uom', 'Product UoS'),
          'product_packaging': fields.many2one('product.packaging', 'Packaging'),
                                  <field name="amount_tax"/>
                                  <field name="amount_total"/>
                                  <button name="button_dummy" states="draft" string="Compute" type="object" icon="gtk-execute"/>
 +                                <button name="%(action_view_sale_advance_payment_inv)d" string="Advance Invoice" type="action" icon="gtk-execute"/>
                              </group>
                              <group col="13" colspan="4">
                                  <field name="state"/>
                                  <separator string="Conditions" colspan="2"/>
                                  <field name="payment_term" widget="selection"/>
                                  <field name="fiscal_position" widget="selection"/>
-                                 <field name="company_id" widget="selection"/>
+                                 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
                              </group>
                              <group colspan="2" col="2" groups="base.group_extended">
                                  <separator string="Dates" colspan="2"/>
                      <field name="user_id" select="1" widget="selection"/>
                      <field name="date_order" select="1" string="Order date" />
                      <newline/>
-                     <group expand="1" string="Group By..." colspan="11" col="11">
+                     <group expand="1" string="Group By..." colspan="11" col="11" groups="base.group_extended">
                          <filter string="Customer" icon="terp-sale" domain="[]" context="{'group_by':'partner_id'}"/>
                          <filter string="Salesman" icon="terp-sale" domain="[]" context="{'group_by':'user_id'}"/>
                          <separator orientation="vertical"/>
                              <field name="delay" groups="base.group_extended"/>
                              <field name="price_subtotal"/>
                              <field name="th_weight"/>
-                             <field colspan="4" name="tax_id" domain="[('parent_id','=',False),('type_tax_use','&lt;&gt;','purchase')]"/>
+                             <separator colspan="4" string="Taxes"/>
+                             <field colspan="4" name="tax_id" domain="[('parent_id','=',False),('type_tax_use','&lt;&gt;','purchase')]" nolabel="1"/>
                              <separator colspan="4" string="States"/>
                              <field name="state"/>
 +                            <button colspan="1"
 +                              name="%(action_view_sale_order_line_make_invoice)d"
 +                              string="Make Invoice"
 +                              type="action"
 +                              icon="gtk-print" />
                              <group col="2" colspan="2">
                                  <button name="button_done"
                                      states="confirmed,exception"
  <!--                        <page string="Properties" groups="base.group_extended">-->
  <!--                            <field name="property_ids" nolabel="1"/>-->
  <!--                        </page>-->
                          <page string="Invoice Lines" groups="base.group_extended">
                              <field colspan="4" name="invoice_lines" nolabel="1"/>
                          </page>
+                         <page string="Notes">
+                             <field colspan="4" name="notes" nolabel="1"/>
+                         </page>
                      </notebook>
                  </form>
              </field>
                      <filter icon="terp-purchase" string="Shipped"
                          domain="[('state','=','done')]"
                          name="unshipped"
-                         separator="1" />
+                         />
                      <filter icon="terp-purchase" string="Uninvoiced" name="uninvoiced"
-                         domain="[('invoiced','&lt;&gt;', 1),('state','&lt;&gt;','draft'),('state','&lt;&gt;','cancel')]" 
-                         separator="1" />
+                         domain="[('invoiced','&lt;&gt;', 1),('state','&lt;&gt;','draft'),('state','&lt;&gt;','cancel')]"
+                         />
+                     <filter icon="terp-purchase" string="Sale Order"
+                         domain="[('state','=','confirmed')]"
+                         name="sale order"
+                         />
                      <separator orientation="vertical"/>
                      <field name="order_id"/>
                      <field name="order_partner_id"/>
              <field name="res_model">sale.order.line</field>
              <field name="view_type">form</field>
              <field name="view_mode">tree,form,graph</field>
-             <field name="context">{"search_default_uninvoiced":1,"search_default_unshipped":1}</field>
              <field name="search_view_id" ref="view_sales_order_uninvoiced_line_filter" />
              <field name="filter" eval="True"/>
          </record>
@@@ -55,7 -55,7 +55,7 @@@
                          <field name="company_id" groups="base.group_multi_company" widget="selection"/>
                      </group>
                      <newline/>
-                     <group expand="1" string="Group By..." colspan="4" col="4">
+                     <group expand="1" string="Group By..." colspan="4" col="4" groups="base.group_extended">
                          <filter string="State" icon="terp-sale" domain="[]" context="{'group_by':'state'}"/>
                          <filter string="Date" icon="terp-sale" domain="[]" context="{'group_by':'date'}"/>
                      </group>
                      <field name="location_dest_id" />
                      <field name="date" />
                      <field name="date_planned" string="Date"/>
-                                       <field name="date_expected" string="Date Expected"/>                    
+                      <field name="date_expected" string="Date Expected"/>                    
                      <field name="state"/>
                  </tree>
              </field>
                      <field name="origin"/>
                      <field name="date"/>
                      <field name="min_date"/>
 +                    <field name="invoice_state"/>
                      <field name="state"/>
                      <button name="%(action_partial_picking)d" states="assigned" string="Validate" type="action" icon="gtk-go-forward" help="Validate Picking"/>
                      <button name="button_cancel" states="assigned,confirmed,draft" string="Cancel" icon="gtk-cancel" help="Cancel" confirm="This operation will cancel the picking.   Do you want to continue?"/>
                                              <field colspan="4" invisible="1" name="name"/>
                                              <field invisible="1" name="date"/>
                                              <field name="date_planned"/>
-                                                                                       <field name="date_expected" string="Date Expected"/>                                            
+                                              <field name="date_expected" string="Date Expected"/>                                            
                                              <field name="address_id" context="{'contact_display':'partner'}"/>
                                              <field groups="base.group_extended" name="product_packaging" domain="[('product_id','=',product_id)]"/>
                                              <field name="prodlot_id" groups="base.group_extended"
              <field name="arch" type="xml">
                  <tree colors="blue:state in ('draft');grey:state in ('cancel');red:state not in ('cancel', 'done') and date &lt; current_date" string="Picking list">
                      <field name="name"/>
-                               <field name="address_id"/>
+                     <field name="address_id"/>
                      <field name="backorder_id" groups="base.group_extended"/>
                      <field name="origin"/>
                      <field name="date"/>
                                      <field name="location_id"/>
                                      <field name="location_dest_id"/>
                                      <field name="date_planned"/>
-                                                                       <field name="date_expected" string="Date Expected"/>                                    
+                                      <field name="date_expected" string="Date Expected"/>                                    
                                      <field name="state"/>
                                      <button
                                             name="%(stock.track_line)d"
                                              <field colspan="4" invisible="1" name="name"/>
                                              <field invisible="1" name="date"/>
                                              <field name="date_planned"/>
-                                                                                       <field name="date_expected"  string="Date Expected"/>                                            
+                                              <field name="date_expected"  string="Date Expected"/>                                            
                                              <field groups="base.group_extended" name="product_packaging"  domain="[('product_id','=',product_id)]"/>
                                              <field name="prodlot_id" groups="base.group_extended"
                                                  context="{'location_id':location_id, 'product_id':product_id}"
                                      <field name="location_id"/>
                                      <field name="location_dest_id"/>
                                      <field name="date_planned"/>
-                                                                       <field name="date_expected" string="Date Expected"/>                                    
+                                      <field name="date_expected" string="Date Expected"/>                                    
                                      <field name="state"/>
                                      <button
                                             name="%(stock.track_line)d"
                                              <field colspan="4" invisible="1" name="name"/>
                                              <field invisible="1" name="date"/>
                                              <field name="date_planned"/>
-                                                                                       <field name="date_expected"  string="Date Expected"/>                                            
+                                              <field name="date_expected"  string="Date Expected"/>                                            
                                              <field groups="base.group_extended" name="product_packaging" domain="[('product_id','=',product_id)]"/>
                                              <field name="prodlot_id" groups="base.group_extended"
                                                  context="{'location_id':location_id, 'product_id':product_id}"
                                              <field groups="product.group_uos" name="product_uos_qty"/>
                                              <field colspan="4" invisible="1" name="name" />
                                              <field groups="base.group_extended" name="date_planned"/>
-                                                                                       <field name="date_expected" groups="base.group_extended" string="Date Expected"/>                                            
+                                              <field name="date_expected" groups="base.group_extended" string="Date Expected"/>                                            
                                              <newline/>
                                              <newline/>
                                              <field groups="base.group_extended" name="product_packaging" domain="[('product_id','=',product_id)]"/>
                      </group>
                      <newline/>
                      <group expand="1" string="Group By..." colspan="4" col="8">
-                       <filter icon="terp-stock" name="state" string="State" domain="[]" context="{'group_by':'state'}"/>
+                         <filter icon="terp-stock" name="state" string="State" domain="[]" context="{'group_by':'state'}"/>
                          <separator orientation="vertical" />
                          <filter string="Partner" icon="terp-stock" domain="[]" context="{'group_by':'address_id'}"/>
                          <separator orientation="vertical" />
                      <group expand="1" string="Group By..." colspan="4" col="8">
                          <filter string="State" icon="terp-stock" domain="[]" context="{'group_by':'state'}"/>
                          <filter string="Partner" icon="terp-stock" domain="[]" context="{'group_by':'address_id'}"/>
-                                               <filter string="Order Date" icon="terp-stock" domain="[]"  context="{'group_by':'date'}"/>
+                         <filter string="Order Date" icon="terp-stock" domain="[]"  context="{'group_by':'date'}"/>
                          <filter string="Expected Date" icon="terp-stock" domain="[]"  context="{'group_by':'min_date'}"/>
                          <filter string="Origin" icon="terp-stock" domain="[]" context="{'group_by':'origin'}"/>
                      </group>
              <field name="type">tree</field>
              <field eval="6" name="priority"/>
              <field name="arch" type="xml">
-                 <tree colors="grey:state in ('cancel');red:date_planned > current_date" string="Moves">
-                     <field name="name" string="Move Name"/>
+                 <tree colors="grey:state in ('cancel');red:(state not in ('cancel','done')) and date_planned > current_date" string="Moves">
+                     <field name="picking_id" select="1"/>
                      <field name="product_id"/>
                      <field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
-                   <field name="product_uom" string="Unit Of Measure"/>
-                     <field name="picking_id" select="1"/>
+                     <field name="product_uom" string="Unit Of Measure"/>
                      <field name="prodlot_id" groups="base.group_extended"/>
                      <field name="location_id"/>
                      <field name="location_dest_id"/>
                      <field name="date_planned"/>
-                                       <field name="date_expected"/>              
+                     <field name="date_expected"/>
                      <field name="state"/>
                  </tree>
              </field>
                                  <separator string="Dates &amp; Priority" colspan="2" />
                                  <field name="date"/>
                                  <field name="date_planned"/>
-                                                               <field name="date_expected"/>                                
+                                 <field name="date_expected"/>                                
                                  <field name="priority"/>
                              </group>
  
              <field name="name">stock.move.search</field>
              <field name="model">stock.move</field>
              <field name="type">search</field>
-             <field eval="6" name="priority"/>
+             <field eval="3" name="priority"/>
              <field name="arch" type="xml">
                  <search string="Stock Moves">
                      <group col="8" colspan="4">
-                         <filter icon="terp-stock" string="Available" name="Available" domain="[('state','=','assigned')]" help="Available"/>
+                         <filter icon="terp-stock" string="Done" name="done" domain="[('state','=','done')]" help="Stock moves"/>
+                         <filter icon="terp-stock" string="Future" name="future" domain="[('state','in',('assigned','confirmed','waiting'))]" help="Future stock moves"/>
+                         <filter icon="terp-stock" string="Ready" name="ready" domain="[('state','=','assigned')]" help="Future stock moves that are ready"/>
                          <separator orientation="vertical"/>
                          <field name="product_id"/>
-                         <field name="location_id"/>
-                         <field name="location_dest_id"/>
+                         <field name="location_id" string="Location" domain="['|',('location_id','ilike',self),('location_dest_id','ilike',self)]"/>
+                         <field name="address_id" string="Partner" context="{'contact_display':'partner'}" domain="[('picking_id.address_id','ilike',self)]"/>
+                         <field name="date_planned"/>
                      </group>
                      <newline/>
                      <group expand="1" string="Group By..." colspan="4" col="8">
-                       <filter icon="terp-stock" string="Inventory" domain="[]" context="{'group_by':'name'}" />
-                       <filter icon="terp-stock" string="State" domain="[]" context="{'group_by':'state'}" />
-                         <filter string="Product" icon="terp-stock" domain="[]"  context="{'group_by':'product_id'}"/>
-                         <filter string="Source Location" icon="terp-stock" domain="[]" context="{'group_by':'location_id'}"/>
-                         <filter string="Dest. Location" icon="terp-stock" domain="[]" context="{'group_by':'location_dest_id'}"/>
-                         <filter string="Date" icon="terp-stock" domain="[]" context="{'group_by':'date'}"/>
+                         <filter string="Product" name="by_product" icon="terp-stock" domain="[]"  context="{'group_by':'product_id'}"/>
+                         <filter string="Lot" name="prodlot_id" icon="terp-stock" domain="[]"  context="{'group_by':'prodlot_id'}"/>
+                         <filter string="Packing" name="picking_id" icon="terp-stock" domain="[]"  context="{'group_by':'picking_id'}"/>
+                         <separator orientation="vertical"/>
+                         <filter string="Source" icon="terp-stock" domain="[]" context="{'group_by':'location_id'}"/>
+                         <filter string="Destination" icon="terp-stock" domain="[]" context="{'group_by':'location_dest_id'}"/>
+                         <separator orientation="vertical"/>
+                         <filter icon="terp-stock" string="State" domain="[]" context="{'group_by':'state'}" />
+                         <separator orientation="vertical"/>
+                         <filter string="Creation" icon="terp-stock" domain="[]" context="{'group_by':'date'}"/>
+                         <filter string="Expected" icon="terp-stock" domain="[]" context="{'group_by':'date_planned'}"/>
                      </group>
                  </search>
              </field>
          </record>
  
          <record id="action_move_form2" model="ir.actions.act_window">
-             <field name="name">All Moves</field>
+             <field name="name">Stock Moves</field>
              <field name="res_model">stock.move</field>
              <field name="type">ir.actions.act_window</field>
              <field name="view_type">form</field>
              src_model="stock.location"/>
  
          <act_window
-             context="{'location': active_id}"
+             context="{'location': active_id, 'search_default_done': 1}"
              domain="[('product_id','=',active_id)]"
              id="act_product_stock_move_open"
-             name="All Stock Moves"
+             name="Stock Moves"
              res_model="stock.move"
              src_model="product.product"/>
  
              src_model="stock.move"/>
  
          <act_window
-             context="{'location': active_id}"
+             context="{'location': active_id, 'search_default_future': 1}"
              domain="[('product_id','=',active_id),('state','in',('waiting','confirmed','assigned'))]"
              id="act_product_stock_move_futur_open"
              name="Future Stock Moves"