mirror of
https://github.com/bringout/oca-ocb-hr.git
synced 2026-04-24 21:32:00 +02:00
Initial commit: Hr packages
This commit is contained in:
commit
62531cd146
2820 changed files with 1432848 additions and 0 deletions
|
|
@ -0,0 +1,27 @@
|
|||
/** @odoo-module **/
|
||||
|
||||
import '@mail/../tests/helpers/mock_server'; // ensure mail overrides are applied first
|
||||
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
import { MockServer } from "@web/../tests/helpers/mock_server";
|
||||
|
||||
patch(MockServer.prototype, 'hr_holidays', {
|
||||
/**
|
||||
* Overrides to add out of office to employees.
|
||||
*
|
||||
* @override
|
||||
*/
|
||||
_mockResPartnerMailPartnerFormat(ids) {
|
||||
const partnerFormats = this._super(...arguments);
|
||||
const partners = this.getRecords(
|
||||
'res.partner',
|
||||
[['id', 'in', ids]],
|
||||
{ active_test: false },
|
||||
);
|
||||
for (const partner of partners) {
|
||||
// Not a real field but ease the testing
|
||||
partnerFormats.get(partner.id).out_of_office_date_end = partner.out_of_office_date_end;
|
||||
}
|
||||
return partnerFormats;
|
||||
},
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue