Odoo Help

0

0
5 Answers
3
Avatar

Niyas Raphy

--Niyas Raphy--
23544
| 7 7 11
Wayanad, India
--Niyas Raphy--

Odoo Techno Functionalist

Feel free to connect :  niyasraphyk@gmail.com

Twitter:https://twitter.com/niyasraphy
LinkedIn: https://www.linkedin.com/in/niyasraphy/
FB:https://www.facebook.com/niyasraphy123

Happy to help :)

Niyas Raphy
09/02/17 22.37

You can find it in addons/project/project_view.xml, then please look on
record_id="view_task_form2",

<field name="planned_hours" widget="float_time"   groups="project.group_time_work_estimation_tasks"      on_change="onchange_planned(planned_hours)"/>

and to make this field readonly give readonly="1"


You told that the field is not visible in the edit form view, and it is visible in form as well as in form view get. So you please refresh the page and check whether it is still showing in form view get and in the form

1 Comment
Tomasz Serwanski
13/02/17 13.32

hello,

thank you for your post - as it shed some light, let me highlight details. there is no such .xml in path you've mentioned (maybe you refer to other odoo than 10)?, but I've found:

- file ./addons/project/views/project_views.xml

- file as above has line:

<group>

<field name="project_id" domain="[('active', '=', True)]" context="{'default_use_tasks':1}"/>

<field name="user_id"

class="o_task_user_field"

options='{"no_open": True}'/>

<field name="legend_blocked" invisible="1"/>

<field name="legend_normal" invisible="1"/>

<field name="legend_done" invisible="1"/>

</group>

- unfortunately still no line seen in 'fields view get' (line: <field name="planned_hours" widget="float_time" on_change="1" modifiers="{}"/>)

- finally I've run search over filesystem for files with text "field name="planned_hours" widget="float_time" on_change="1"" inside - and.. it gave no result :(

so still, could anyone advice where from comes line " <field name="planned_hours" widget="float_time" on_change="1" modifiers="{}"/> " visible in 'fields view get'?

regards

Tomasz

0
Megha_SerpentCS
18/07/18 07.50

Tomasz Serwanzki,

by applying below code,the planned hours field will become readonly

<record id="project_task_form2_inherited" model="ir.ui.view">
<field name="name">project.task.form2.inherited</field>
<field name="model">project.task</field>
<field name="inherit_id" ref="hr_timesheet.view_task_form2_inherited" />
<field eval="2" name="priority"/>
<field name="arch" type="xml">
<field name="planned_hours" position="attributes">
<attribute name="readonly">1</attribute>
</field>
</field>
</record>
0
Tomasz Serwanski
13/02/17 14.00

..and.. finally got it :) there is a need to take a look at 'inherited views' - seems this field is edited there. I was able to make it read only and it works :)


now it is second step - I woul dlike to have this field to be:

- read only for users, but

- readwrite for project manager


could anyone advice how to manage access rights to particular field?


regards

Tomasz

Ask a Question
Keep Informed
1 follower(s)
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