Skip to Content
Odoo Menu
  • Prijavi
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Knjigovodstvo
  • Zaloga
  • PoS
  • Projekt
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
Pomoč

How can we block the editing of planned hours in a task

Naroči se

Get notified when there's activity on this post

This question has been flagged
projectv7task
3 Odgovori
6635 Prikazi
Avatar
Jean-Philippe Bourque

Hi, I'm looking if it's possible to block to "Project User" the edition of the field "Planned hours" in a task.

1
Avatar
Opusti
Avatar
Naresh Soni (nch)
Best Answer

Hello Jean,

Yes, Its possible. You can create a new group or assign an existing group where only project managers are allowed and assign that group to the planned hours field.By doing this the user that doesn't belong to that group will not be able to see that field.

You can create a group in security/security.xml file of the module

<record id="Your_new_group" model="res.groups">
<field name="name">Your new group</field>
<field name="users" eval="IF YOU HAVE USERS CREATED IN DEMO DATA"/>                                    </record>

Note: you can also later assign users to this group from interface

Then go to the form view of project task and apply this group to the fields that you want to restrict. for eg:<field name="planned_hours" groups="project.Your_new_group"/>

Through Interface:

Referring 7.0 there is already a group available for this field. Just go to Settings/Users/Users

Edit the user that you want to apply restriction on. Go to second Tab (Access Rights) You will see under Technical Settings a boolean entry as 'Time Estimation on Tasks' just untick that for the user.

Note: If you are not able to view Technical Settings then you need to check the boolean Technical Features under the Access rights tab for the logged in user only then you will be able to view the details settings.

Thanks,

2
Avatar
Opusti
Jean-Philippe Bourque
Avtor

Hi Thanks for the fast answer. Can you give me more details or a link of how to create a group with the specific field and not object.

Naresh Soni (nch)

Hi Jean, I have updated my original answer.

Jean-Philippe Bourque
Avtor

Thanks. Do you know a way through the interface and developer mode. To be honest, I'm not a professional programmer more a power user. I tried to avoid as much as possible to edit files.

Naresh Soni (nch)

Hi Jean I have updated my original answer

Jean-Philippe Bourque
Avtor

Hi Naresh, That make a lot of sense :) Thank you. However,I just tried this and for a unknow reason the checkbox retick itself when I push the save button on the user?!?!!

Naresh Soni (nch)

Hi Jean, yes it seems a problem but just try to relogin and do the same operation again that should work i.e second edition should be saved !

Jean-Philippe Bourque
Avtor

I tried what you said and other things as untick all checkbox related to tasks. They stay ticked !?! I will try other stuff later, I keep you posted

Jean-Philippe Bourque
Avtor

Doesn't work and I tried a lot of possibilities...

Naresh Soni (nch)

can you check here : http://7-0-5569.runbot.openerp.com/?db=7-0-5569-all I checked here and seems ok with second try i.e relogin again and doing the same operation on the user.

Jean-Philippe Bourque
Avtor

Hi, solved the issue in another way (see below). Comments for better implantation always welcome

Andrew

i'm also having the issue of the tick boxes staying checked. how did you solve this problem? thanks!

Avatar
jamesbale
Best Answer

Creating group same not object level or field level, but how to use this field is depend you.

You can create group as usual in folder security --> security.xml file.

<record id="group_new" model="res.groups">
    <field name="name">new group</field>
    <field name="category_id" ref="base.module_category_hidden"/>
</record>
1
Avatar
Opusti
Avatar
Jean-Philippe Bourque
Avtor Best Answer

Hi, here the solution I put in place. Comments welcome if you saw some basics problems.

  • Activate debug mode
  • Go to the task view
  • In the debug dropdown select "Edit Formview"
  • Copy the the line containing the "planned hours" (see exemple below)
  • In one line add the groups attributes with the group allowed to edit (here project manager)
  • in other line add the Readonly group and the field attributes readonly="1" (here project user)

<field name="planned_hours" widget="float_time" groups="project.group_project_user" on_change="onchange_planned(planned_hours, effective_hours)" readonly="1"/>

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

Note1 : The technical feature "Task estimation" will be disabled for this specific field. The field will be visible by every users.

Note2 : For Manager the field will be displayed 2 times because of the inheritance from User, to avoid that you should remove the inherice

0
Avatar
Opusti
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Prijavi
Related Posts Odgovori Prikazi Aktivnost
How to export tasks (from project management)
project management v7 task
Avatar
2
avg. 20
10016
Report Designer: field date showing time w/o timezone (wrong hour)
project timezone v7 task
Avatar
1
mar. 15
6687
Problem with adding a timesheet line in a task
project v7 timesheet task
Avatar
0
mar. 15
7520
Is it possible to display delivery address on project task?
project v7 task shipping
Avatar
Avatar
1
mar. 15
6204
[meta] Why isn't the OpenERP project driven on OpenERP ?
project v7 task issue
Avatar
Avatar
1
mar. 15
5282
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now