<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Odoo on Định Nguyễn</title>
    <link>https://dinhnn.com/tags/odoo/</link>
    <description>Recent content in Odoo on Định Nguyễn</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 09 Apr 2026 00:00:00 +0700</lastBuildDate>
    <atom:link href="https://dinhnn.com/tags/odoo/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>When a Bad Custom Module Breaks Odoo&#39;s Attendance — And You Have to Fix It in Yours</title>
      <link>https://dinhnn.com/posts/odoo-attendance-overtime-problem/</link>
      <pubDate>Thu, 09 Apr 2026 00:00:00 +0700</pubDate>
      <guid>https://dinhnn.com/posts/odoo-attendance-overtime-problem/</guid>
      <description>&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; This is a personal log of what I ran into while vibe-coding an Odoo integration with Claude. Some of the approaches and assumptions here may not be correct if you have more professional Odoo experience than I do. Take it as a war story, not a best practice guide.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h2 id=&#34;tldr&#34; class=&#34;anchor-link&#34;&gt;&lt;a href=&#34;#tldr&#34;&gt;TL;DR&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Odoo 18&amp;rsquo;s core &lt;code&gt;hr_attendance&lt;/code&gt; module works fine. The overtime computation, the unique constraint, the &lt;code&gt;_update_overtime()&lt;/code&gt; logic — all correct. The problem? A third-party custom module that overrides &lt;code&gt;create()&lt;/code&gt; and &lt;code&gt;write()&lt;/code&gt; on &lt;code&gt;hr.attendance&lt;/code&gt; &lt;strong&gt;without understanding the side effects&lt;/strong&gt;. It triggers &lt;code&gt;_update_overtime()&lt;/code&gt; multiple times for the same day, causing a duplicate key violation. Your attendance record gets rolled back. The employee&amp;rsquo;s scan vanishes.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
