Odoo Help

Welcome!

This community 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.

0

Time sheet values are not updating in odoo9.0?

By
savita
on 9/20/16, 6:46 AM 62 views

Hi All,

I have added two fields through xpath in my custom module project.task in that Timesheet tab.The values are not updating in Timesheet line when i add these two fields in line item of timesheet tab.If i remove these two fields from xpath then the timesheet line items are getting updated.

class project_task(models.Model):
    _inherit = 'project.task'
    timesheet_ids = fields.One2many('account.analytic.line','timesheet', string='Timesheet')
class account_analytic_line_inherit(models.Model):
    _inherit = 'account.analytic.line'
   
timesheet=fields.Many2one('project.task' )   
job_selections = fields.Boolean(string="Job Start" )   
job_stop = fields.Boolean(string="Job Stop" )  

.xml

<?xml version="1.0" encoding="utf-8"?>
<openerp>    <data>       
<record model="ir.ui.view" id="view_task_form2_wms_inherited">           
<field name="name">wms.project.task.form.inherited</field>           
<field name="model">project.task</field>           
<field name="inherit_id" ref="project.view_task_form2" />           
<field name="arch" type="xml">               
    <xpath expr="//field[@name='timesheet_ids']/tree/field[1]" position="after">                        
        <field name="job_selections"/>                     
        <field name="job_stop"/>                                 
    </xpath>           
</field>       
</record>   
</data>
</openerp>
 

Expecting Suggestions..

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 9/20/16, 6:46 AM
Seen: 62 times
Last updated: 9/20/16, 10:17 AM