Odoo Help

0

I want to aligment to LEFT IN table in fie .rml

By
huongcute
on 10/1/14, 6:02 AM 1,206 views

Hello everybody !

 

I want to aligment to LEFT of table in fie report . I tried : code :<blockTable  alignment="LEFT" colWidths="45.0,140.0,82.0,82.0,82.0,82.0"  style="table2"> 

 

But it doesnt work. I dont know how do it?

Can anybody help me?

Thanks all friends

0
huongcute
On 10/1/14, 10:47 PM

yeah!

Thák. This is my code :  .rml

<?xml version="1.0" encoding="utf-8"?>
<document filename="Sales Order.pdf">
  <template title="Sales Order" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
    <pageTemplate id="first">
      <frame id="first" x1="15.0" y1="42.0" width="539" height="758"/>
    </pageTemplate>
  </template>
  <stylesheet>
    <blockTableStyle id="Standard_Outline">
      <blockAlignment value="LEFT"/>
      <blockValign value="TOP"/>
    </blockTableStyle>
    <blockTableStyle id="Table1">
      <blockAlignment value="LEFT"/>
      <blockValign value="TOP"/>
    </blockTableStyle>
    <blockTableStyle id="Table2">
      <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="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
      <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
      <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
      <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
      <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="4,0" stop="4,-1"/>
      <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="4,0" stop="4,0"/>
      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
      <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="5,0" stop="5,-1"/>
      <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="5,0" stop="5,-1"/>
      <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="5,0" stop="5,0"/>
      <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>       
    </blockTableStyle>

    <initialize>
      <paraStyle name="all" alignment="justify"/>
    </initialize>
    <paraStyle name="terp_header" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
    <paraStyle name="terp_default_8" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
    <paraStyle name="terp_default_Bold_9" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
    <paraStyle name="terp_default_9" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
    <paraStyle name="terp_tblheader_General_Centre" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
    <paraStyle name="terp_default_Centre_8" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
    <paraStyle name="terp_tblheader_Details" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
    <paraStyle name="terp_tblheader_Details_Centre" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
    <paraStyle name="terp_tblheader_Details_Right" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
    <paraStyle name="terp_default_Centre_9" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
    <paraStyle name="terp_default_Right_9" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
    <paraStyle name="terp_default_1" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
    <paraStyle name="terp_default_Right_9_Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
    
    <images/>
  </stylesheet>
  <story>

    <para style="terp_default_8">
      <font color="white"> </font>
    </para>
    <para style="terp_default_8">
      <font color="white"> </font>
    </para>
    <para style="terp_header"><b>DANH SÁCH THỬ VIỆC</b></para>

    <blockTable colWidths="45.0,140.0,82.0,82.0,82.0,82.0" style="Table2">
      <tr>
        <td>
          <para style="terp_tblheader_General_Centre"><b>Mã Nv </b></para>
        </td>
  
        <td>
          <para style="terp_tblheader_General_Centre"><b>Tên nhân viên</b></para>
        </td>
        <td>
          <para style="terp_tblheader_General_Centre"><b>Bộ phận</b></para>
        </td>
        <td>
          <para style="terp_tblheader_General_Centre"><b>Ngày bắt đầu</b></para>
        </td>
        <td>
          <para style="terp_tblheader_General_Centre"><b>Ngày kết thúc</b></para>
        </td> 
        <td>
          <para style="terp_tblheader_General_Centre"><b>Lương thử việc</b></para>
        </td>                       
      </tr>
    </blockTable>
    <blockTable colWidths="45.0,140.0,82.0,82.0,82.0,82.0" style="Table2">
      <tr>
        <td>
          <para style="terp_default_Centre_8">[[ repeatIn(objects,'tv') ]]</para>
          <para style="terp_default_Centre_8">[[ tv.ma_nvtv ]]</para>
        </td>
  
        <td>
          <para style="terp_default_Centre_8">[[ tv.ten_nvtv ]]</para>
        </td>
        <td>
          <para style="terp_default_Centre_8">[[ tv.ten_bp.ten_bp ]]</para>
        </td>
        <td>
          <para style="terp_default_Centre_8">[[ tv.ngay_bd ]]</para>
        </td>
        <td>
          <para style="terp_default_Centre_8">[[ tv.ngay_kt ]]</para>
        </td> 
        <td>
          <para style="terp_default_Centre_8">[[ tv.luong_tv ]]</para>
        </td>                       
      </tr>
    </blockTable>
    <para style="terp_default_8">
      <font color="white"> </font>
    </para>
   
    <para style="terp_default_8">
      <font color="white"> </font>
    </para>
  </story>
</document>

can you give me content of your RML file ? It might help me to resolve your issue.

Emipro Technologies Pvt. Ltd.
on 10/3/14, 1:44 AM

yeah ! My code .rml <template title="Sales Order" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20"> DANH SÁCH THỬ VIỆC Mã Nv Tên nhân viên Bộ phận Ngày bắt đầu Ngày kết thúc Lương thử việc [[ repeatIn(objects,'tv') ]] [[ tv.ma_nvtv ]] [[ tv.ten_nvtv ]] [[ tv.ten_bp.ten_bp ]] [[ tv.ngay_bd ]] [[ tv.ngay_kt ]] [[ tv.luong_tv ]]

huongcute
on 10/3/14, 2:44 AM
0

Hi,

You have to give the alignment value on the style as like below.

<blockTableStyle id="table2">
      <blockAlignment value="LEFT"/>
      <blockValign value="TOP"/>
</blockTableStyle>

Then you can use this style into you blocktable as like below.

<blockTable colWidths="45.0,140.0,82.0,82.0,82.0,82.0"  style="table2"> 

I hope your problem is solved.

 

 

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 10/1/14, 6:02 AM
Seen: 1206 times
Last updated: 3/16/15, 8:10 AM