Skip to Content
Odoo Menu
  • Sign in
  • 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
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

Integrity error while installing hr_timesheet module

Subscribe

Get notified when there's activity on this post

This question has been flagged
modulehr_timesheet
2 Replies
9498 Views
Avatar
Jasim

Hi, When i try to install hr_timesheet module, on OE 7, latest edition (tried with many versions from April onwards ) I am getting an error

Integrity Error

The operation cannot be completed, probably due to the following: - deletion: you may be trying to delete a record while other records still reference it - creation/update: a mandatory field is not correctly set

[object with reference: name - name]

The log @ openerp shows like this

2013-05-16 17:13:12,190 15857 ERROR zsenda openerp.netsvc: Integrity Error
The operation cannot be completed, probably due to the following:
- deletion: you may be trying to delete a record while other records still refer                                                                                        ence it
- creation/update: a mandatory field is not correctly set

[object with reference: name - name]
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/openerp/netsvc.py", line 292, in dispatch_r                                                                                        pc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 626,                                                                                         in dispatch
    res = fn(db, uid, *params)
  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 188, in execute_k                                                                                        w
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 172, in wrapper
    netsvc.abort_response(1, _('Integrity Error'), 'warning', msg)
  File "/usr/lib/pymodules/python2.7/openerp/netsvc.py", line 71, in abort_respo                                                                                        nse
    raise openerp.osv.osv.except_osv(description, details)
except_osv: ('Integrity Error', 'The operation cannot be completed, probably due                                                                                         to the following:\n- deletion: you may be trying to delete a record while other                                                                                         records still reference it\n- creation/update: a mandatory field is not correct                                                                                        ly set\n\n[object with reference: name - name]')
2013-05-16 17:13:12,191 15857 INFO zsenda werkzeug: 192.168.1.190 - - [16/May/20                                                                                        13 17:13:12] "POST /web/dataset/call_button HTTP/1.1" 200 -

The error is not raising when I create a new database and install the hr_timesheet at first. I have tried all these

a. Update the addon codes and upgraded modules which is required for hr_timesheet b. Deleted hr_timesheet (after some sql hacks) and replaced with latest repository module and tried to install it again.

DELETE FROM ir_model_constraint WHERE module = 216;
DELETE FROM ir_model_relation WHERE module = 216;
ALTER TABLE hr_employee DROP COLUMN uom_id, DROP COLUMN journal_id, DROP COLUMN product_id;
DROP TABLE IF EXISTS hr_analytic_timesheet CASCADE;
ALTER TABLE account_analytic_account DROP COLUMN use_timesheets;
DROP TABLE IF EXISTS hr_analytical_timesheet_employee CASCADE;
DROP TABLE IF EXISTS hr_analytical_timesheet_users CASCADE;
DROP TABLE IF EXISTS hr_sign_out_project CASCADE;
DROP TABLE IF EXISTS hr_sign_in_project CASCADE;

c. Backing up of database and restored as new database and tried to install the module again. It also have the same effect (integrity error)

The modules I have installed so far

process
account_cancel
account_voucher
purchase
web_view_editor
hr_payroll
base_import
stock
account_payment
l10n_in_hr_payroll
web_kanban
hr
account_asset
account_accountant
procurement
base_action_rule
web_graph
board
product
base_status
web_diagram
hr_attendance
web_gantt
sale_stock
account_followup
hr_expense
warning
web_tests
web_calendar
web
project
account_chart
sale_crm
hr_payroll_account
account
base_setup
auth_signup
l10n_in
edi
crm
hr_evaluation
decimal_precision
web_shortcuts
sale
analytic
hr_holidays
share
survey
base
mail
email_template
fetchmail
hr_contract
base_calendar
resource
1
Avatar
Discard
Avatar
Pedro Arroyo
Best Answer

borro el empleado administrador? al parecer necesita un registro en la tabla hr_employee con id 1. Intente ingresarlo en la tabla hr_employee con id 1 y el campo active en false.

saludos.

0
Avatar
Discard
Avatar
Jasim
Author Best Answer

To jsut hack it out, just open hr_timesheet_data.xml and comment out like this

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data noupdate="1">
      <!---
        <record id="analytic_journal" model="account.analytic.journal">
            <field name="code">TS</field>
            <field name="name">Timesheet Journal</field>
            <field name="type">general</field>
        </record>

        <record id="hr.employee" model="hr.employee">
            <field name="journal_id" ref="analytic_journal"/>
        </record>
      -->
    </data>
</openerp>

Then installation of module will be done smoothly.

Later, Goto Accounting >> Analytic Accounting > Analytic Journals Create a new Analytic Accounting Journal with Journal Name "Timesheet Journal" ,Journal Code "TS", and Type "General"

Later Goto "Human Resources" > "Employees" Take each employee and goto "HR Settings" and put Analytic Journal to "Timesheet Journal" and make sure the product should be selected which you are timely billing like "Time based Software Development / Service"

0
Avatar
Discard
Santiago

This looks like a work around. I have the same problem, and I wonder if the root cause is a bug in the software or a problem with my database

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

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

Sign up
Related Posts Replies Views Activity
Error when importing module Product Bidding In ECommerce in odoo 17
module
Avatar
Avatar
1
Jul 24
2569
Missing required value for the field 'Model' (model_id)
module
Avatar
Avatar
1
Jan 24
6428
View newly installed Module
module
Avatar
Avatar
Avatar
2
Mar 23
3493
How to check for installed modules from my __init__.py?
module
Avatar
Avatar
3
Jun 20
11382
Helpdesk Module
module
Avatar
Avatar
Avatar
2
Mar 20
9972
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