This question has been flagged
2818 Views

How can i update a record value from the website front end

For example: 

I have a model Drops (x_drivers_lines) where al the drops of the drivers are listed (x_customer , x_driver_id , amount, date, droped)

Now i would like to make a table on the website front end where the driver kan see his list for the day and update the record if he has visited the customer


<div class="container">
<div class="row">
<t t-if="not is_public_user">
<table class="table table-hover">
<thead>
<tr class="active">
<th>Datum</th>
<th>Chauffeur #</th>
<th>Klant</th>
<th>TO do / don</th>
</tr>
</thead>
<tbody>


<t t-foreach="website.env['x_drivers_lines'].search([('x_rit_datum','ilike',time.strftime('%Y-%m-%d'))])" t-as="routes">
<t t-if="routes.x_customer">
<tr>
<td><span t-field="routes.x_rit_datum"/></td>
<td><span t-field="routes.x_driver_id.name"/></td>
<td><span t-field="routes.x_customer"/></td>

<td><span t-field="routes.x_droped"/></td> <----- here a would like to have a button to change the boolean to true
</tr>
</t>
</t>
</tbody>
</table>
</t>
</div>
</div>


Version 10.0 enterprise

( PS I only have access to the odoo GUI not to the server)

thx for your responds!





Avatar
Discard