Search
 
SCRIPT & CODE EXAMPLE
 

HTML

Can I customize the Work Order Tablet View? I want all the buttons at the top. odoo

You can get this kind of design:


With this inherited View:

<data>
  
<button name="action_menu" position="before">
  <field name="id" class="o_workorder_icon_btn" widget="back_arrow" readonly="1"/>
</button>

<div class="workorder_bar" position="replace"/>

<div class="workorder_actions" position="after">
  <div class="workorder_bar">
    <table width="100%">
      <tr>
        <td style="padding-bottom:10px;">
          <span>Step: <field name="name" readonly="1"/></span><br/>
          <span>W/O: <field name="workcenter_id" readonly="1"/></span>
        </td>
        <td style="padding-bottom:10px;">
          <span>Product: <field name="product_id" readonly="1"/></span><br/>
          <span>Needed: <field name="qty_producing" 
            attrs="{'readonly': ['|', '|', ('allow_producing_quantity_change', '=', False), 
                                           ('product_tracking', '=', 'serial'), 
                                           ('state', 'in', ('done', 'cancel'))]}" 
            required="1"/>
            <label for="product_uom_id" string=""/>
            <field name="product_uom_id" options="{'no_open': True}" readonly="1"/>
          </span>
          <span> / Remaining: <field name="qty_remaining"/>
            <label for="product_uom_id" string="" class="oe_inline"/>
            <field name="product_uom_id" options="{'no_open': True}" readonly="1"/>
          </span>
         </td>
         <td style="padding-bottom:10px;">
           <span>User: <field name="user_id" readonly="1"/></span><br/>
           <span>M/O: <field name="production_id" readonly="1"/></span>
         </td>
         <td style="padding-bottom:10px;">
           <span>Final </span><br/>
           <span attrs="{'invisible': [('product_tracking', '!=', 'lot')]}">Lot: </span>
           <span attrs="{'invisible': [('product_tracking', '!=', 'serial')]}">Serial: </span>      
         </td>
         <td style="padding-bottom:20px;">
            <div attrs="{'invisible': [('product_tracking', '=', 'none')]}">
              <field name="finished_lot_id" 
                     context="{'default_product_id': product_id, 'default_company_id': company_id}" 
                     domain="[('id', 'in', allowed_lots_domain)]"/>
              <button name="action_generate_serial" type="object" class="btn btn-secondary fa fa-plus-square-o" 
                      aria-label="Creates a new serial/lot number" title="Creates a new serial/lot number" 
                      role="img" attrs="{'invisible': [('finished_lot_id', '!=', False)]}"/>
            </div>      
         </td>
      </tr>
    </table>
  </div>
</div>

</data>
Comment

PREVIOUS NEXT
Code Example
Html :: spinup wp increate max upload size 
Html :: ocr 
Html :: how to send html file with express 
Html :: restart remote computer cmd using ip address 
Html :: html input radio 
Html :: nuxt paginate bootstrap 5 
Html :: pass text from input field to javascript function 
Html :: openGraph 3 
Html :: iframe - Full Screen - HTML 
Html :: accept method jsf component 
Html :: meta name= viewport 
Html :: default checked radio button 
Html :: how to make dropdown in html 
Html :: How to write a empty character in HTML 
Html :: iframe maps 
Html :: html5 astrix for absolutely required field inside a td tag 
Html :: displa text in html 
Html :: add link behind a button in html 
Html :: input type submit align center 
Html :: html width 
Html :: reactstrap input background color when autocomplete 
Html :: html check-box 
Html :: html phone click to call 
Html :: bootstrap 5 color picker 
Html :: add delay to hrefs 
Html :: disable overscroll html 
Html :: how to link submit button to another page in html 
Html :: html downloading a file 
Html :: how to add google map in html 
Html :: html multiplications 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =