Thursday, January 4, 2024
2 changes · master
Resolved issues and error corrections
This change corrects how Chilean point-of-sale orders choose document types and journals, preventing export invoices or incompatible sales journals from being selected by default. It helps sales be validated smoothly by automatically creating and posting the appropriate default document during POS transactions.
Original PR description
Description of the issue/feature this PR addresses: This is a work-in-progress commit, to be tested and complemented. It fixes the weird behavior of #97417 Current behavior before PR: the document type 110 (export invoice) was selected by default when the partner was empty (the xml_id was incorrect) once corrected this, more unexpected behaviors arrived: - the journal for the pos order should not be a sales journal since when validated without document type raises an error from LatAm document type constraints. Desired behavior after PR is merged: when selecting products in the pos and doing the sale, automatically create the default document and post it -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Employee attendance data now considers only company-relevant global time off when calculating work durations. This prevents employees from being affected by leave records that belong to another company, improving accuracy in HR attendance and contract-related data.
Original PR description
Before this commit, `_get_calendar_attendances` was calling the calendar method `get_work_duration_data` without specifying the company in the domain, ending up in wrong data if global leaves that don't concern the employee are concerning the calendar. This commit adds a domain for that method call so that only relevent global leaves are taken into account.