Branch
[MISC+FIX] to_hr_payroll: use payroll localization category instead localization -Odoo provide payroll localization at https://github.com/Viindoo/odoo/blob/cf5994705a85551737ffa8e7ffe04d4c120892ea/odoo/addons/base/data/ir_module_category_data.xml#L22 we should use that instead. This commit also fix wrong category set on action 'open_payroll_modules'
[FIX] viin_pos_refund: pos order might have 2 line same product but different price -Step to reproduce: create a pos order with 2 line of same product, first product we set the default price as it currently, the second one we set different price -> Confirm -> create invoice -> Go to pos ui to refund -> Singleton error happen -Solution: beside filter using product_id, we also filter using price_unit. In case pos user not changing the price but add discount then this filtered is still correct.
[MISC] to_hr_expense: rename field as odoo have the same but different type -New PR merge upstream from v15 https://github.com/Viindoo/odoo/pull/833 with latest odoo commit 230e5beba518c7bfdaedbf4587e25e20c490d4e8 has add a field call 'expense_sheet_id' (one2many) in module sale_expense, we have this field but with type is many2one. -So there are a few cases here: Case 1: Customers using odoo 15 and have latest code from odoo. If they buy and install to_hr_expense, expense_sheet_id will be changed to many2one, expense_sheet_id one2many field will no longer exist -> this is really bad because it will definitely cause errors. Case 2: The customer has purchased the to_hr_expense module without the latest code from odoo 15, the customer's server (not yet installed sale_expense) updates the latest code from odoo 15, then install the sale_expense field, the expense_sheet_id field is still only many2one defined by the to_hr_expense module (tested twice but still dont get it why it still many2one, well never mind) ==>>>>> With both 2 cases, this commit will always cover: we change 'expense_sheet_id' to 'viin_expense_sheet_id' (just like we did when upgrade to 16) , and of course change the related logic, add migration script to change the field name (change in ir_model_fields table and rename column). ***NOTE: - This commit also remove some redundant code and when forward it to v16/master + only change the code which has been removed in the init file (the pre_init_hook) -Only notify the customer to get the latest and upgrade module and they will good to go.
[UPG] viin_hr_work_entry*: upg for 17.0 Features: 1. Delete the `Work Entry` permission group, use the HR group instead - Internal users: View work entries for themselves and their subordinates - Officer HR: Read/Create/Edit work entries for all employees - Admin HR: full permission 2. Delete the Work Entry analysis report, use pivot view instead. 3. Add the 'Payroll Rate' feature of module viin_resource_calendar_rate to this module viin_hr_work_entry Technical: 1. Move the _get_contract_work_entries_values function to the viin_hr_work_entry_holidays module 2. Change the calculation of Duartion (Days) at compute _compute_duration_days of Work Entry to Odoo (Duartion (Days) on work schedule). Add TODO to fix the Duartion (Days) value on the work schedule if the value is different from 0.5 and 1.0 3. Add test cases
[UPG] viin_mail_channel_privacy: upg to 17.0 , rename to discuss_channel_privacy -Rename to viin_discuss_channel_privacy due to mail.channel module renamed -Technical change due to odoo changes as well -Odoo already search for partners who are in the channel so nothing to do about it will private channel -No improvement