merge changes of addons
authorNajlaa <nel@silver>
Tue, 9 Sep 2008 07:22:55 +0000 (09:22 +0200)
committerNajlaa <nel@silver>
Tue, 9 Sep 2008 07:22:55 +0000 (09:22 +0200)
bzr revid: nel@silver-20080909072255-m8vi0qacouml6d9n

1  2 
addons/account/account_assert_test.xml
addons/account/report/invoice.rml
addons/stock/stock.py
addons/stock/stock_view.xml

@@@ -5,11 -5,7 +5,12 @@@
              <test expr="not len(line_id) or line_id[0].state != 'valid' or (sum([l.debit - l.credit for l in line_id]) &lt;= 0.00001)"/>
          </assert>
  
 +        <!--assert model="account.invoice" search="[]" string="If the invoice is paid, third party accounting lines must be reconciled">
 +                      <test expr="not state == 'paid' or ..." />
 +              </assert-->
 +
 +   <!--     <assert model="account.account" search="[]" string="For all accounts, the balance is equal to the sum of the balance of its childs">
+         <assert model="account.account" search="[]" string="For all accounts, the balance is equal to the sum of the balance of its childs">
              <test expr="not len(child_id) or (balance - sum([c.balance for c in child_id]) &lt;= 0.00001)"/>
          </assert>
  
        <blockAlignment value="LEFT"/>
        <blockValign value="TOP"/>
      </blockTableStyle>
 -    <blockTableStyle id="Tableau6">
 +    <blockTableStyle id="Table_Invoice_General_Header">
 +      <blockAlignment value="LEFT"/>
 +      <blockValign value="TOP"/>
 +      <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
 +      <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
 +      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
 +      <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
 +      <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
 +      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
 +      <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
 +      <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
 +      <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
 +      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
 +    </blockTableStyle>
 +    <blockTableStyle id="Table_General_Detail_Content">
 +      <blockAlignment value="LEFT"/>
 +      <blockValign value="TOP"/>
 +      <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
 +      <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
 +      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
 +      <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
 +      <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
 +      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
 +      <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
 +      <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
 +      <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
 +      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
 +    </blockTableStyle>
 +    <blockTableStyle id="Table_Header_Invoice_Line">
        <blockAlignment value="LEFT"/>
        <blockValign value="TOP"/>
 -      <lineStyle kind="LINEBEFORE" colorName="#000000" start="0,0" stop="0,-1"/>
 -      <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
        <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
 -      <lineStyle kind="LINEBEFORE" colorName="#000000" start="1,0" stop="1,-1"/>
 -      <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
        <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
 -      <lineStyle kind="LINEBEFORE" colorName="#000000" start="2,0" stop="2,-1"/>
 -      <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
        <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
 -      <lineStyle kind="LINEBEFORE" colorName="#000000" start="3,0" stop="3,-1"/>
 -      <lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
        <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
 -      <lineStyle kind="LINEBEFORE" colorName="#000000" start="4,0" stop="4,-1"/>
 -      <lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/>
        <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
 -      <lineStyle kind="LINEBEFORE" colorName="#000000" start="5,0" stop="5,-1"/>
 -      <lineStyle kind="LINEAFTER" colorName="#000000" start="5,0" stop="5,-1"/>
 -      <lineStyle kind="LINEABOVE" colorName="#000000" start="5,0" stop="5,0"/>
        <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
 -      <blockBackground colorName="#e6e6e6" start="0,0" stop="0,-1"/>
 -      <blockBackground colorName="#e6e6e6" start="1,0" stop="1,-1"/>
 -      <blockBackground colorName="#e6e6e6" start="2,0" stop="2,-1"/>
 -      <blockBackground colorName="#e6e6e6" start="3,0" stop="3,-1"/>
 -      <blockBackground colorName="#e6e6e6" start="4,0" stop="4,-1"/>
 -      <blockBackground colorName="#e6e6e6" start="5,0" stop="5,-1"/>
      </blockTableStyle>
 -    <blockTableStyle id="Tableau7">
 +    <blockTableStyle id="Table_Invoice_Line_Content">
        <blockAlignment value="LEFT"/>
        <blockValign value="TOP"/>
 +      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
 +      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
 +      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
 +      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
 +      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
 +      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
 +      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/>
 +      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="7,-1" stop="7,-1"/>
 +      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
 +      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
 +      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
 +      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
 +      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
 +      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
 +      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/>
 +      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="7,-1" stop="7,-1"/>
      </blockTableStyle>
 -    <blockTableStyle id="Tableau8">
 +    <blockTableStyle id="Table_Format_2">
        <blockAlignment value="LEFT"/>
        <blockValign value="TOP"/>
 +      <lineStyle kind="LINEBEFORE" colorName="#ffffff" start="0,0" stop="0,-1"/>
 +      <lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,0" stop="0,0"/>
 +      <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
 +      <lineStyle kind="LINEBEFORE" colorName="#ffffff" start="1,0" stop="1,-1"/>
 +      <lineStyle kind="LINEABOVE" colorName="#ffffff" start="1,0" stop="1,0"/>
 +      <lineStyle kind="LINEBELOW" colorName="#ffffff" start="1,-1" stop="1,-1"/>
 +      <lineStyle kind="LINEAFTER" colorName="#ffffff" start="2,0" stop="2,-1"/>
 +      <lineStyle kind="LINEABOVE" colorName="#ffffff" start="2,0" stop="2,0"/>
 +      <lineStyle kind="LINEBELOW" colorName="#ffffff" start="2,-1" stop="2,-1"/>
 +      <lineStyle kind="LINEBEFORE" colorName="#ffffff" start="3,0" stop="3,-1"/>
 +      <lineStyle kind="LINEAFTER" colorName="#ffffff" start="3,0" stop="3,-1"/>
 +      <lineStyle kind="LINEABOVE" colorName="#ffffff" start="3,0" stop="3,0"/>
 +      <lineStyle kind="LINEBELOW" colorName="#ffffff" start="3,-1" stop="3,-1"/>
 +      <lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/>
 +      <lineStyle kind="LINEABOVE" colorName="#000000" start="5,0" stop="5,0"/>
 +      <lineStyle kind="LINEABOVE" colorName="#000000" start="6,0" stop="6,0"/>
 +      <lineStyle kind="LINEABOVE" colorName="#000000" start="10,0" stop="10,0"/>
 +      <lineStyle kind="LINEABOVE" colorName="#000000" start="11,0" stop="11,0"/>
 +      <lineStyle kind="LINEABOVE" colorName="#000000" start="12,0" stop="12,0"/>
 +      <lineStyle kind="LINEBEFORE" colorName="#ffffff" start="0,1" stop="0,-1"/>
 +      <lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,1" stop="0,1"/>
 +      <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
 +      <lineStyle kind="LINEAFTER" colorName="#ffffff" start="1,1" stop="1,-1"/>
 +      <lineStyle kind="LINEABOVE" colorName="#ffffff" start="1,1" stop="1,1"/>
 +      <lineStyle kind="LINEBELOW" colorName="#ffffff" start="1,-1" stop="1,-1"/>
 +      <lineStyle kind="LINEABOVE" colorName="#000000" start="0,2" stop="0,2"/>
 +      <lineStyle kind="LINEABOVE" colorName="#000000" start="1,2" stop="1,2"/>
 +      <lineStyle kind="LINEABOVE" colorName="#000000" start="2,2" stop="2,2"/>
 +      <lineStyle kind="LINEABOVE" colorName="#000000" start="0,4" stop="0,4"/>
 +      <lineStyle kind="LINEABOVE" colorName="#000000" start="1,4" stop="1,4"/>
 +      <lineStyle kind="LINEABOVE" colorName="#000000" start="2,4" stop="2,4"/>
      </blockTableStyle>
 -    <blockTableStyle id="Tableau3">
 +    <blockTableStyle id="Table_format_Table_Line_total">
        <blockAlignment value="LEFT"/>
        <blockValign value="TOP"/>
 -      <blockBackground colorName="#e6e6e6" start="0,1" stop="0,-1"/>
 -      <blockBackground colorName="#e6e6e6" start="1,1" stop="1,-1"/>
 -      <blockBackground colorName="#e6e6e6" start="2,1" stop="2,-1"/>
 +      <lineStyle kind="LINEBEFORE" colorName="#ffffff" start="0,0" stop="0,-1"/>
 +      <lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,0" stop="0,0"/>
 +      <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
 +      <lineStyle kind="LINEAFTER" colorName="#ffffff" start="1,0" stop="1,-1"/>
 +      <lineStyle kind="LINEABOVE" colorName="#ffffff" start="1,0" stop="1,0"/>
 +      <lineStyle kind="LINEBELOW" colorName="#ffffff" start="1,-1" stop="1,-1"/>
 +    </blockTableStyle>
 +    <blockTableStyle id="Table_eclu_Taxes_Total">
 +      <blockAlignment value="LEFT"/>
 +      <blockValign value="TOP"/>
 +      <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
 +      <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
 +      <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
      </blockTableStyle>
 -    <blockTableStyle id="Tableau4">
 +    <blockTableStyle id="Table_Taxes_Total">
        <blockAlignment value="LEFT"/>
        <blockValign value="TOP"/>
 -      <blockBackground colorName="#e6e6e6" start="0,0" stop="0,-1"/>
 -      <blockBackground colorName="#e6e6e6" start="1,0" stop="1,-1"/>
 -      <blockBackground colorName="#e6e6e6" start="2,0" stop="2,-1"/>
      </blockTableStyle>
 -    <blockTableStyle id="Tableau5">
 +    <blockTableStyle id="Table_Total_Include_Taxes">
 +      <blockAlignment value="LEFT"/>
 +      <blockValign value="TOP"/>
 +      <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
 +      <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
 +      <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
 +    </blockTableStyle>
-     <blockTableStyle id="Table_Main_Tax_Table">
++    <blockTableStyle id="Table_Tax_Content_Table">
 +      <blockAlignment value="LEFT"/>
 +      <blockValign value="TOP"/>
 +      <lineStyle kind="LINEBEFORE" colorName="#ffffff" start="0,0" stop="0,-1"/>
 +      <lineStyle kind="LINEAFTER" colorName="#ffffff" start="0,0" stop="0,-1"/>
 +      <lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,0" stop="0,0"/>
 +      <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
 +      <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
 +      <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
 +      <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
-       <lineStyle kind="LINEBEFORE" colorName="#ffffff" start="4,0" stop="4,-1"/>
-       <lineStyle kind="LINEAFTER" colorName="#ffffff" start="4,0" stop="4,-1"/>
-       <lineStyle kind="LINEABOVE" colorName="#ffffff" start="4,0" stop="4,0"/>
-       <lineStyle kind="LINEBELOW" colorName="#ffffff" start="4,-1" stop="4,-1"/>
-       <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
-       <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/>
-       <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="7,-1" stop="7,-1"/>
-       <lineStyle kind="LINEABOVE" colorName="#ffffff" start="8,0" stop="8,0"/>
-       <lineStyle kind="LINEBELOW" colorName="#ffffff" start="8,-1" stop="8,-1"/>
-       <lineStyle kind="LINEBEFORE" colorName="#ffffff" start="9,0" stop="9,-1"/>
-       <lineStyle kind="LINEABOVE" colorName="#ffffff" start="9,0" stop="9,0"/>
-       <lineStyle kind="LINEBELOW" colorName="#ffffff" start="9,-1" stop="9,-1"/>
-       <lineStyle kind="LINEBEFORE" colorName="#ffffff" start="10,0" stop="10,-1"/>
-       <lineStyle kind="LINEAFTER" colorName="#ffffff" start="10,0" stop="10,-1"/>
-       <lineStyle kind="LINEABOVE" colorName="#ffffff" start="10,0" stop="10,0"/>
-       <lineStyle kind="LINEBELOW" colorName="#ffffff" start="10,-1" stop="10,-1"/>
 +      <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
 +      <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
 +      <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
 +      <lineStyle kind="LINEBEFORE" colorName="#ffffff" start="0,2" stop="0,-1"/>
 +      <lineStyle kind="LINEAFTER" colorName="#ffffff" start="0,2" stop="0,-1"/>
-       <lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,2" stop="0,2"/>
 +      <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
 +      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
 +      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
 +      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
 +      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
 +      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
 +      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
-       <lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,4" stop="0,4"/>
-       <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
-       <lineStyle kind="LINEBEFORE" colorName="#ffffff" start="0,5" stop="0,-1"/>
-       <lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,5" stop="0,5"/>
-       <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
-       <lineStyle kind="LINEBEFORE" colorName="#ffffff" start="1,5" stop="1,-1"/>
-       <lineStyle kind="LINEAFTER" colorName="#ffffff" start="1,5" stop="1,-1"/>
-       <lineStyle kind="LINEABOVE" colorName="#ffffff" start="1,5" stop="1,5"/>
-       <lineStyle kind="LINEBELOW" colorName="#ffffff" start="1,-1" stop="1,-1"/>
 +    </blockTableStyle>
 +    <blockTableStyle id="Table_Tax_Header">
 +      <blockAlignment value="LEFT"/>
 +      <blockValign value="TOP"/>
 +      <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
 +      <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
 +      <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
 +    </blockTableStyle>
-     <blockTableStyle id="Table_Detail_Outer_Content">
-       <blockAlignment value="LEFT"/>
-       <blockValign value="TOP"/>
-       <lineStyle kind="LINEBEFORE" colorName="#ffffff" start="0,0" stop="0,-1"/>
-       <lineStyle kind="LINEAFTER" colorName="#ffffff" start="0,0" stop="0,-1"/>
-       <lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,0" stop="0,0"/>
-       <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
-       <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
-       <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
-       <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
-       <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
-       <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
-       <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
-     </blockTableStyle>
-     <blockTableStyle id="Table_Tex_Content_Table">
++    <blockTableStyle id="Table_Tax_Content">
 +      <blockAlignment value="LEFT"/>
 +      <blockValign value="TOP"/>
 +      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
 +      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
 +      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
 +    </blockTableStyle>
-     <blockTableStyle id="Table_Format_Line_2">
-       <blockAlignment value="LEFT"/>
-       <blockValign value="TOP"/>
-       <lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,0" stop="0,0"/>
-       <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
-     </blockTableStyle>
-     <blockTableStyle id="Table_Format_Table_Line_1">
++    <blockTableStyle id="Table_Border_Style">
 +      <blockAlignment value="LEFT"/>
 +      <blockValign value="TOP"/>
-       <lineStyle kind="LINEBEFORE" colorName="#ffffff" start="0,0" stop="0,-1"/>
 +      <lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,0" stop="0,0"/>
-       <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
-       <lineStyle kind="LINEBEFORE" colorName="#ffffff" start="1,0" stop="1,-1"/>
-       <lineStyle kind="LINEAFTER" colorName="#ffffff" start="1,0" stop="1,-1"/>
-       <lineStyle kind="LINEABOVE" colorName="#ffffff" start="1,0" stop="1,0"/>
-       <lineStyle kind="LINEBELOW" colorName="#ffffff" start="1,-1" stop="1,-1"/>
 +    </blockTableStyle>
 +    <blockTableStyle id="Table_Coment_Payment_Term">
 +      <blockAlignment value="LEFT"/>
 +      <blockValign value="TOP"/>
-       <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
-       <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
-       <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
-       <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
 +    </blockTableStyle>
 +    <blockTableStyle id="Table_Payment_Terms">
        <blockAlignment value="LEFT"/>
        <blockValign value="TOP"/>
-       <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
-       <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
-       <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
-       <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
      </blockTableStyle>
      <initialize>
        <paraStyle name="all" alignment="justify"/>
      </initialize>
-     <paraStyle name="P1" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
-     <paraStyle name="P2" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
-     <paraStyle name="P3" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
-     <paraStyle name="P4" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
-     <paraStyle name="P5" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
-     <paraStyle name="P6" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
 -    <paraStyle name="P1" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="6.0"/>
 -    <paraStyle name="P2" fontName="Times-Roman" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
 -    <paraStyle name="P3" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
 -    <paraStyle name="P4" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
 -    <paraStyle name="P5" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
 -    <paraStyle name="P6" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
 -    <paraStyle name="P7" fontName="Times-Roman" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
 -    <paraStyle name="P8" fontName="Times-Roman" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
 -    <paraStyle name="P9" fontName="Times-Italic" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
 -    <paraStyle name="P10" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
 -    <paraStyle name="P11" fontName="Times-Bold" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
 -    <paraStyle name="P12" fontName="Times-Roman" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
 -    <paraStyle name="P13" fontName="Times-Roman" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
 -    <paraStyle name="P14" fontName="Times-Roman" fontSize="14.0" leading="17" alignment="LEFT"/>
 -    <paraStyle name="P15" fontName="Times-Roman" fontSize="14.0" leading="17" alignment="CENTER"/>
 -    <paraStyle name="P16" fontName="Times-Roman" fontSize="20.0" leading="25" alignment="LEFT"/>
 -    <paraStyle name="P17" fontName="Times-Roman" fontSize="20.0" leading="25" alignment="LEFT"/>
 -    <paraStyle name="P18" fontName="Times-Roman" fontSize="11.0" leading="14"/>
 -    <paraStyle name="P19" fontName="Times-Roman" fontSize="11.0" leading="14"/>
 -    <paraStyle name="P20" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="LEFT"/>
 -    <paraStyle name="P21" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="0.0"/>
 -    <paraStyle name="P22" fontName="Times-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
 -    <paraStyle name="P23" fontName="Times-Roman" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
++    <paraStyle name="P1" fontName="Helvetica" fontSize="7.0" leading="9" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
      <paraStyle name="Standard" fontName="Times-Roman"/>
      <paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
      <paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
        </tr>
      </blockTable>
      <section>
 -      <para style="P21">[[repeatIn(o.invoice_line,'l') ]]</para>
 -      <blockTable colWidths="216.0,62.0,62.0,62.0,51.0,74.0" style="Tableau7">
 +      <para style="terp_default_8">[[ repeatIn(o.invoice_line,'l') ]]</para>
 +      <blockTable colWidths="211.0,62.0,36.0,27.0,63.0,51.0,46.0,26.0" style="Table_Invoice_Line_Content">
          <tr>
            <td>
 -            <para style="Table Contents">[[ l.name ]]</para>
 +            <para style="terp_default_8">[[ l.name ]]</para>
            </td>
            <td>
 -            <para style="P6">[[ ', '.join([lt.name for lt in l.invoice_line_tax_id]) ]]</para>
 +            <para style="terp_default_9">[[ ', '.join([lt.name for lt in l.invoice_line_tax_id]) ]]</para>
            </td>
            <td>
 -            <para style="P8">[[ formatLang(l.quantity) ]] [[l.uos_id and l.uos_id.name or '' ]]</para>
 +            <para style="terp_default_Right_9">[[ formatLang(l.quantity) ]]</para>
            </td>
            <td>
 -            <para style="P8">[[ formatLang(l.price_unit) ]]</para>
 +            <para style="terp_default_Right_9">[[ (l.uos_id and l.uos_id.name) or '' ]]</para>
            </td>
            <td>
 -            <para style="P8">[[ l.discount and formatLang (l.discount) or '' ]] </para>
 +            <para style="terp_default_Right_9">[[ formatLang(l.price_unit) ]]</para>
            </td>
            <td>
 -            <para style="P8">[[ formatLang(l.price_subtotal) ]] [[o.currency_id.code ]]</para>
 +            <para style="terp_default_Right_9">[[ l.discount and formatLang (l.discount) or '' ]] </para>
 +          </td>
 +          <td>
 +            <para style="terp_default_Right_9">[[ formatLang(l.price_subtotal) ]]</para>
 +          </td>
 +          <td>
 +            <para style="terp_default_Right_9">[[ o.currency_id.code ]]</para>
            </td>
          </tr>
 -      </blockTable>
 -      <blockTable colWidths="28.0,499.0" style="Tableau8">
          <tr>
            <td>
-             <para style="terp_default_8">[[ repeatIn((l.note and l.note.splitlines()) or [], 'note') ]]</para>
-             <para style="terp_default_9">[[ note or removeParentNode('para') ]]</para>
 -            <para style="P22">[[ repeatIn((l.note and l.note.splitlines()) or [], 'note') ]]</para>
++            <para style="P1">[[ repeatIn((l.note and l.note.splitlines()) or [], 'note') ]]</para>
++            <para style="P1">[[ note or removeParentNode('para') ]]</para>
 +          </td>
 +          <td>
 +            <para style="terp_default_9">
 +              <font color="white"> </font>
 +            </para>
 +          </td>
 +          <td>
-             <para style="terp_default_Right_9">
++            <para style="terp_default_9">
 +              <font color="white"> </font>
 +            </para>
 +          </td>
 +          <td>
-             <para style="terp_default_Right_9">
++            <para style="terp_default_9">
 +              <font color="white"> </font>
 +            </para>
 +          </td>
 +          <td>
-             <para style="terp_default_Right_9">
++            <para style="terp_default_9">
 +              <font color="white"> </font>
 +            </para>
 +          </td>
 +          <td>
-             <para style="terp_default_Right_9">
++            <para style="terp_default_9">
 +              <font color="white"> </font>
 +            </para>
            </td>
            <td>
-             <para style="terp_default_Right_9">
 -            <para style="P9">[[ note or removeParentNode('table') ]]</para>
++            <para style="terp_default_9">
 +              <font color="white"> </font>
 +            </para>
 +          </td>
 +          <td>
-             <para style="terp_default_Right_9">
++            <para style="terp_default_9">
 +              <font color="white"> </font>
 +            </para>
            </td>
          </tr>
        </blockTable>
                </td>
              </tr>
            </blockTable>
 -        </td>
 -        <td>
 -          <blockTable colWidths="214.0,95.0" style="Tableau5">
 +          <para style="terp_default_2">
 +            <font color="white"> </font>
 +          </para>
 +          <blockTable colWidths="119.0,93.0,28.0" style="Table_Total_Include_Taxes">
              <tr>
                <td>
 -                <para style="P7">Total (excl. taxes):</para>
 +                <para style="terp_default_Bold_9">Total (inclu. taxes):</para>
 +              </td>
 +              <td>
 +                <para style="terp_default_Right_9">[[ formatLang(o.amount_total) ]]</para>
                </td>
                <td>
 -                <para style="P12">[[ formatLang(o.amount_untaxed) ]] [[o.currency_id.code ]]</para>
 +                <para style="terp_default_Right_9">[[ o.currency_id.code ]]</para>
                </td>
              </tr>
 +          </blockTable>
 +        </td>
 +      </tr>
 +    </blockTable>
-     <para style="terp_default_2">
-       <font color="white"> </font>
-     </para>
-     <blockTable colWidths="520.0" style="Table_Main_Tax_Table">
++    <blockTable colWidths="530.0" style="Table_Tax_Content_Table">
 +      <tr>
 +        <td>
-           <para style="terp_default_White_2">[[ o.amount_tax  or removeParentNode('blockTable') ]]</para>
-           <blockTable colWidths="56.0,59.0,49.0" style="Table_Tax_Header">
++          <para style="terp_default_8">[[ format(o.amount_tax or removeParentNode('blockTable')) ]]</para>
++          <blockTable colWidths="65.0,62.0,68.0" style="Table_Tax_Header">
              <tr>
                <td>
-                 <para style="P3">Tax</para>
 -                <para style="P7">Taxes:</para>
++                <para style="terp_tblheader_Details_Centre">Tax</para>
 +              </td>
 +              <td>
-                 <para style="P1">Base</para>
++                <para style="terp_tblheader_Details_Right">Base</para>
                </td>
                <td>
-                 <para style="P2">Amount</para>
 -                <para style="P12">[[ formatLang(o.amount_tax) ]] [[o.currency_id.code ]]</para>
++                <para style="terp_tblheader_Details_Right">Amount</para>
                </td>
              </tr>
 +          </blockTable>
 +          <para style="terp_default_2">
 +            <font color="white"> </font>
 +          </para>
-           <blockTable colWidths="265.0" style="Table_Detail_Outer_Content">
-             <tr>
-               <td>
-                 <para style="terp_default_8">[[ repeatIn(o.tax_line,'t') ]]</para>
-                 <blockTable colWidths="63.0,38.0,60.0" style="Table_Tex_Content_Table">
-                   <tr>
-                     <td>
-                       <para style="P6">[[ t.name ]]</para>
-                     </td>
-                     <td>
-                       <para style="P5">[[ formatLang(t.base) ]]</para>
-                     </td>
-                     <td>
-                       <para style="P4">[[ formatLang(t.amount) or 0.00 ]]</para>
-                     </td>
-                   </tr>
-                 </blockTable>
-               </td>
-             </tr>
-           </blockTable>
-           <blockTable colWidths="527.0" style="Table_Format_Line_2">
++        </td>
++      </tr>
++      <tr>
++        <td>
++          <para style="terp_default_8">[[ repeatIn(o.tax_line,'t') ]]</para>
++          <blockTable colWidths="62.0,61.0,67.0" style="Table_Tax_Content">
              <tr>
                <td>
-                 <para style="terp_default_2">
-                   <font color="white"> </font>
-                 </para>
 -                <para style="P13">Total <font face="Times-Roman">(incl. taxes):</font></para>
++                <para style="terp_default_Centre_8">[[ t.name ]]</para>
 +              </td>
-             </tr>
-           </blockTable>
-           <para style="terp_default_8">
-             <font color="white"> </font>
-           </para>
-           <blockTable colWidths="259.0,259.0" style="Table_Format_Table_Line_1">
-             <tr>
 +              <td>
-                 <para style="terp_default_2">
-                   <font color="white"> </font>
-                 </para>
++                <para style="terp_default_Right_8">[[ formatLang(t.base) ]]</para>
                </td>
                <td>
-                 <para style="terp_default_2">
-                   <font color="white"> </font>
-                 </para>
 -                <para style="P23">[[ formatLang(o.amount_total) ]] [[o.currency_id.code ]]</para>
++                <para style="terp_default_Right_8">[[ formatLang(t.amount) or 0.00 ]]</para>
                </td>
              </tr>
            </blockTable>
-           <para style="terp_default_8">
 -          <para style="Table Contents">
++        </td>
++      </tr>
++    </blockTable>
++    <blockTable colWidths="530.0" style="Table_Border_Style">
++      <tr>
++        <td>
++          <para style="terp_default_2">
              <font color="white"> </font>
            </para>
          </td>
        </tr>
      </blockTable>
 -    <para style="P20">[[ format(o.comment or '') ]]</para>
 -    <para style="P20">
 +    <blockTable colWidths="530.0" style="Table_Coment_Payment_Term">
 +      <tr>
 +        <td>
-           <para style="terp_default_8">[[ format(o.comment or removeParentNode('blockTable')) ]]</para>
++          <para style="terp_default_9">[[ format(o.comment or removeParentNode('blockTable')) ]]</para>
 +        </td>
 +      </tr>
 +    </blockTable>
 +    <para style="terp_default_2">
 +      <font color="white"> </font>
 +    </para>
 +    <blockTable colWidths="530.0" style="Table_Payment_Terms">
 +      <tr>
 +        <td>
 +          <para style="terp_default_9">[[ format((o.payment_term and o.payment_term.note) or removeParentNode('blockTable')) ]]</para>
 +        </td>
 +      </tr>
 +    </blockTable>
-     <para style="terp_default_9">
++    <para style="terp_default_2">
++      <font color="white"> </font>
++    </para>
++    <para style="terp_default_2">
        <font color="white"> </font>
      </para>
 -    <para style="P20">[[ format((o.payment_term and o.payment_term.note) or '') ]]</para>
    </story>
  </document>
 -
@@@ -331,48 -325,8 +325,48 @@@ stock_tracking(
  class stock_picking(osv.osv):
      _name = "stock.picking"
      _description = "Packing list"
 +    def _set_minimum_date(self, cr, uid, ids, name, value, arg, context):
 +        if value!=False:
 +                cr.execute("update stock_picking set min_date='%s' where id in (%d)"%(value,ids))
 +    def get_minimum_date(self, cr, uid, ids, field_name, arg, context={}):
 +        res = {}
 +        for pick in self.browse(cr, uid, ids):
 +            res[pick.id] = None
 +            cr.execute("select min_date from stock_picking where id =%d"%pick.id)
 +            min_date = cr.fetchone()[0]
 +            if not min_date:
 +                move_ids = [x.id for x in pick.move_lines ]
 +                if len(move_ids):
 +                    cr.execute("select min(date_planned) from stock_move where id in (" + ','.join(map(str, move_ids)) + ")")
 +                    res[pick.id] = cr.fetchone()[0] or None
 +            else:
 +                res[pick.id]=min_date
 +
 +        return res
 +
 +    def _set_maximum_date(self, cr, uid, ids, name, value, arg, context):
 +        if value!=False:
 +                cr.execute("update stock_picking set max_date='%s' where id in (%d)"%(value,ids))
 +    def get_maximum_date(self, cr, uid, ids, field_name, arg, context={}):
 +        res = {}
 +        for pick in self.browse(cr, uid, ids):
 +            res[pick.id] = None
 +            cr.execute("select max_date from stock_picking where id =%d"%pick.id)
 +            max_date = cr.fetchone()[0]
 +            if not max_date:
 +                move_ids = [x.id for x in pick.move_lines ]
 +                if len(move_ids):
 +                    cr.execute("select max(date_planned) from stock_move where id in (" + ','.join(map(str, move_ids)) + ")")
 +                    res[pick.id] = cr.fetchone()[0] or None
 +            else:
 +                res[pick.id]=max_date
 +
 +        return res
 +    
 +    
 +    
      _columns = {
-         'name': fields.char('Packing name', size=64, required=True, select=True),
+         'name': fields.char('Reference', size=64, required=True, select=True),
          'origin': fields.char('Origin', size=64),
          'type': fields.selection([('out','Sending Goods'),('in','Getting Goods'),('internal','Internal'),('delivery','Delivery')], 'Shipping Type', required=True, select=True),
          'active': fields.boolean('Active'),
                  <form string="Packing list">
                      <notebook>
                          <page string="General Information">
 +                            <field name="name" select="1"/>
-                             <newline/>
+                             <field name="address_id" select="2" context="{'context_display':'partner'}"/>
+                             <field name="type" select="2" readonly="1"/>
+                             <field name="name" select="1" readonly="1"/>
+                             <field name="date" select="1"/>
 +                            <field name="type" select="2"/>
 +                            <field name="invoice_state" select="2"/>
                              <newline/>
 +                                 <field name="min_date" select="1"/>
 +                                 <field name="max_date" select="1"/>
 +                            <field name="location_id"/>
 +                            <field name="location_dest_id"/>
 +                            <field name="address_id" select="2"/>
-                             <field colspan="4" name="move_lines" nolabel="1" widget="one2many_list">
+                             <field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_out_id': address_id}">
                                  <form string="Stock Moves">
                                      <separator colspan="4" string="Move Information"/>
-                                     <field colspan="4" context="location=parent.location_id" name="product_id" on_change="onchange_product_id(product_id, parent.location_id, parent.location_dest_id)" select="1"/>
-                                     <field name="product_uom" select="1"/>
+                                     <field name="location_id" select="1" domain="[('usage','=','internal')]"/>
+                                     <field name="location_dest_id" select="1" domain="[('usage','=','internal')]"/>
+                                     <field colspan="4" context="location=location_id" name="product_id" on_change="onchange_product_id(product_id, location_id, location_dest_id)" select="1"/>
                                      <field name="product_qty" select="1"/>
+                                     <field name="product_uom" select="1"/>
                                      <field groups="product.group_uos" name="product_uos"/>
                                      <field groups="product.group_uos" name="product_uos_qty"/>
-                                     <field colspan="4" name="name" select="1"/>
-                                     <field name="date"/>
+                                     <field colspan="4" invisible="1" name="name" select="1"/>
+                                     <field invisible="1" name="date"/>
                                      <field name="date_planned"/>
-                                     <field name="priority"/>
-                                     <field name="location_id" select="1"/>
-                                     <field name="location_dest_id" select="1"/>
-                                     <field name="address_id" select="1"/>
-                                     <field name="product_packaging"/>
+                                     <field name="address_id" select="1" context="{'context_display':'partner'}"/>
+                                     <field groups="base.group_extended" name="product_packaging"/>
                                      <field context="product_id=product_id" name="prodlot_id" select="1"/>
-                                     <field name="tracking_id" select="1"/>
+                                     <field groups="base.group_extended" name="tracking_id" select="1"/>
                                      <newline/>
                                      <label/>
                                      <button name="%(track_line)d" string="Split in production lots" type="action"/>
              <field name="type">form</field>
              <field name="arch" type="xml">
                  <form string="Packing list">
 -                    <field name="address_id" select="2" context="{'context_display':'partner'}"/>
 -                    <field name="origin" select="2"/>
 -                    <field name="name" select="1" readonly="1"/>
 -                    <field name="date" select="1" readonly="1"/>
 +                    <field name="name" select="1"/>
 +                    <field name="date" select="1"/>
 +                          <field name="min_date" select="1"/>
 +                          <field name="max_date" select="1"/>
 +                    <newline/>
 +                    <field name="address_id" select="2"/>
                      <notebook colspan="4">
                          <page string="General Information">
-                             <field colspan="4" name="move_lines" nolabel="1" widget="one2many_list">
+                             <field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_out_id': address_id}">
                                  <form string="Stock Moves">
                                      <separator colspan="4" string="Move Information"/>
-                                     <field colspan="4" context="location=parent.location_id" name="product_id" on_change="onchange_product_id(product_id, parent.location_id, parent.location_dest_id)" select="1"/>
-                                     <field name="product_uom" select="1"/>
+                                     <field name="location_id" select="1" domain="[('usage','=','internal')]"/>
+                                     <field name="location_dest_id" select="1" domain="[('usage','&lt;&gt;','view')]"/>
+                                     <field colspan="4" context="location=location_id" name="product_id" on_change="onchange_product_id(product_id, location_id, location_dest_id)" select="1"/>
                                      <field name="product_qty" select="1"/>
+                                     <field name="product_uom" select="1"/>
                                      <field groups="product.group_uos" name="product_uos"/>
                                      <field groups="product.group_uos" name="product_uos_qty"/>
                                      <field colspan="4" invisible="1" name="name" select="1"/>
              <field name="type">form</field>
              <field name="arch" type="xml">
                  <form string="Packing list">
 -                    <field name="address_id" select="2" context="{'context_display':'partner'}"/>
 -                    <field name="date" select="1" readonly="1"/>
 -                    <field name="origin" select="2"/>
 -                    <field name="name" select="1" readonly="1"/>
 +                    <field name="name" select="1"/>
 +                    <field name="address_id" select="2"/>
 +                    <newline/>
 +                   <field name="min_date" select="1"/>
 +                   <field name="max_date" select="1"/>
                      <notebook colspan="4">
                          <page string="General Information">
-                             <field colspan="4" name="move_lines" nolabel="1" widget="one2many_list">
+                             <field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_out_id': address_id}">
                                  <form string="Stock Moves">
                                      <separator colspan="4" string="Move Information"/>
-                                     <field colspan="4" context="location=parent.location_id" name="product_id" on_change="onchange_product_id(product_id, parent.location_id, parent.location_dest_id)" select="1"/>
-                                     <field name="product_uom" select="1"/>
+                                     <field name="location_id" select="1" domain="[('usage','=','internal')]"/>
+                                     <field name="location_dest_id" select="1" domain="[('usage','&lt;&gt;','view')]"/>
+                                     <field colspan="4" context="location=location_id" name="product_id" on_change="onchange_product_id(product_id, location_id, location_dest_id)" select="1"/>
                                      <field name="product_qty" select="1"/>
+                                     <field name="product_uom" select="1"/>
                                      <field groups="product.group_uos" name="product_uos"/>
                                      <field groups="product.group_uos" name="product_uos_qty"/>
                                      <field colspan="4" invisible="1" name="name" select="1"/>
              <field name="type">form</field>
              <field name="arch" type="xml">
                  <form string="Input Packing List">
-                     <field name="address_id" on_change="onchange_partner_in(address_id)" select="2"/>
+                     <field name="address_id" on_change="onchange_partner_in(address_id)" select="2" context="{'context_display':'partner'}"/>
+                     <field name="origin" select="2"/>
+                     <field name="invoice_state" select="2" string="Invoice Control"/>
                      <field name="name" readonly="1" select="1"/>
 +                    <field name="location_id"/>
 +                    <field domain="[('usage','=','internal')]" name="location_dest_id"/>
 +                    <field name="invoice_state" select="2" string="Supplier Invoice Control"/>
 +                    <field name="origin" select="2"/>
 +                   <field name="min_date" select="1"/>
 +                   <field name="max_date" select="1"/>
                      <notebook colspan="4">
                          <page string="General Information">
-                             <field colspan="4" name="move_lines" nolabel="1" widget="one2many_list">
+                             <field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_in_id': address_id}">
                                  <tree string="Stock Moves">
                                      <field name="product_id"/>
                                      <field name="product_qty"/>
                                      <field groups="product.group_uos" name="product_uos"/>
                                      <field groups="product.group_uos" name="product_uos_qty"/>
                                      <field colspan="4" invisible="1" name="name" select="1"/>
 -                                    <field groups="base.group_extended" name="date"/>
                                      <field groups="base.group_extended" name="date_planned"/>
                                      <newline/>
-                                     <field name="location_id" select="1"/>
-                                     <field domain="[('usage','=','internal')]" name="location_dest_id" select="1"/>
                                      <newline/>
                                      <field groups="base.group_extended" name="product_packaging"/>
                                      <newline/>