merge
authorFabien Pinckaers <fp@tinyerp.com>
Mon, 6 Apr 2009 12:38:10 +0000 (14:38 +0200)
committerFabien Pinckaers <fp@tinyerp.com>
Mon, 6 Apr 2009 12:38:10 +0000 (14:38 +0200)
bzr revid: fp@tinyerp.com-20090406123810-tbj1z9n1rknezq3p

addons/account/account_view.xml
addons/product/product_view.xml
addons/sale/sale.py
addons/sale/sale_view.xml
addons/stock/report_stock_view.xml
addons/stock/stock_sequence.xml

index 352d71a..2a4116c 100644 (file)
                     <field name="period_id" select="2"/>
                     <group colspan="2" col="3">
                         <button name="%(wizard_populate_statement_from_inv)d"
-                            string="Import Invoice" type="action" />
+                            string="Import Invoice" type="action" attrs="{'invisible':[('state','=','confirm')]}"/>
                     </group>
                     <newline/>
                     <field name="balance_start"/>
index 843c71c..ef19205 100644 (file)
@@ -18,6 +18,7 @@
                     <field name="default_code"/>
                     <field name="name"/>
                     <field name="variants"/>
+                    <field name="uom_id"/>
                     <field name="qty_available"/>
                     <field name="virtual_available"/>
                     <field invisible="'partner_id' not in context" name="price"/>
index 5732bf3..ed908df 100644 (file)
@@ -850,7 +850,7 @@ class sale_order_line(osv.osv):
 
     def product_id_change(self, cr, uid, ids, pricelist, product, qty=0,
             uom=False, qty_uos=0, uos=False, name='', partner_id=False,
-            lang=False, update_tax=True, date_order=False, packaging=False, fiscal_position=False):
+            lang=False, update_tax=True, date_order=False, packaging=False, fiscal_position=False, flag=False):
         if not  partner_id:
             raise osv.except_osv(_('No Customer Defined !'), _('You have to select a customer in the sale form !\nPlease set one customer before choosing a product.'))
         warning={}
@@ -913,8 +913,8 @@ class sale_order_line(osv.osv):
             result['delay'] = (product_obj.sale_delay or 0.0)
             partner = partner_obj.browse(cr, uid, partner_id)
             result['tax_id'] = self.pool.get('account.fiscal.position').map_tax(cr, uid, fpos, product_obj.taxes_id)
-
-        result['name'] = product_obj.partner_ref
+        if not flag:    
+            result['name'] = product_obj.partner_ref
         domain = {}
         if (not uom) and (not uos):
             result['product_uom'] = product_obj.uom_id.id
index 8eff669..32e4227 100644 (file)
                                             <field
                                                 context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
                                                 name="product_uom_qty"
-                                                on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], False, parent.date_order, product_packaging, parent.fiscal_position)"
+                                                on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], False, parent.date_order, product_packaging, parent.fiscal_position, True)"
                                                 select="1"/>
                                             <field name="product_uom"
                                                 on_change="product_uom_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], False, parent.date_order)"/>
index 650942b..61381af 100644 (file)
             <field name="arch" type="xml">
                 <tree string="Stock Location" colors="blue:usage=='view';darkred:usage=='internal'">
                     <field name="complete_name"/>
+                    <field name="usage"/>
                     <field name="stock_real_value" />
                     <field name="stock_virtual_value" />
                 </tree>
index 8eeea65..464d003 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <openerp>
-    <data>
+    <data noupdate="1">
         <!--
     Sequences for packings
     -->