summaryrefslogtreecommitdiff
path: root/addons/hr_contract/security/ir.model.access.csv
AgeCommit message (Collapse)Author
2019-03-19[REF] hr_payroll: Remove parent_id hierarchy + Add structures categorizationYannick Tivisse
1/ Remove the parent-children relation on salary structures Currently it is difficult to see what rules are applied on salary structures. Most of the structures are inheriting 3 rules (Basic, Gross, Net) from the 'Base for new structures', and those rules are not shown. Same issue if a structure has another one as parent (as in the French localization). This bring more annoying issues: - Since the saas-12.1, we can already set different accounts for different companies on the salary rules for which we want to post journal entries. But for the parent rules, like the 'NET' amount, it's impossible to post the journal entries on different account for different salary structures. (eg: for CP200 employees and CP200 workers). As the rules are following a M2M relation on the structure, we have to remove the parent_id and to recreate all the rules in the final structure. - If we are not at ease with the M2M relation (which is the case for most of the end users), we will simply modify the rule on the parent structure. This was already done on the French localization on which we modified the code, sequence and the name. This could have some desastrous consequences as this will break the order on which the rules are computed for other structures for the sequence, or break other integration with the payroll as we also modify the code, for example the salary configurator. As this parent-children relation on structure could cause several issues difficult to spot and as this is quite difficult to correctly visualize the structure composition, it is better to remove it and define all the rules inside the structure itself. This improves also the code readability as we are not trying to recursively retrieve the rules and find a proper sequence inside them. 2/ Make the rules on the salary structure a o2m instead of a m2m The issues described just above indicates that it would be better to remove the M2M relation between salary structures and salary rules, and make it a O2M relation instead. That way, no more confusion and misconfiguration of the rules fields (code, sequence, accounts, ...). 3/ Remove the parent-children relation on rules A salary rule can have a parent salary rule. This mechanism, which is not obvious at all for an end user allows to specify a parent rules. If the condition is met for the parent rule (eg: the employee has at least 1 child), all the children rules could be applied (eg: Deduction of 90 euros if the number of children is between 1 and 1). Visually it doesn't make a lot of sense, as it displays one line with an amount of 0 for the parent, and one line with the real amount for each applied child. On the other hand, no child rule is linked to the structure and an end user has to click on the parent rule, to see the children and understand that something mystic and hidden is existing. This is equivalent to define as many classic rules as we have children, or even better, define 1 rule that will compute the real amount directly, as the number of children can be accessed from the localdict when computing the salary line. This commit also removed the relation. 4/ Clean some brols in the code (technical) The 3 first points of the spec allow us to clean a little the code readability and complexity. 5/ Adapt all the localizations for these changes All the localizations are impacted by those changes. What is done in this commit is mainly: - l10n_be_hr_payroll: Make 3 separated files for the 3 existing structures (the fourth one, belgian worker, is not correct and is removed). For each structure, define explicitely the rules (in the correct order by sequence). This multiplies the total number of rules as some of them were shared (like the withholding tax rule for example), but all the code that is supposed to be modified each year/quarter/whenever the government decides to modify the law has been moved into a python file, and is available the computation context. This will also allow us to update the computation rules without having to update the module. - l10n_fr_hr_payroll: There were 3 rules following this scheme: Base for new structure | Basic structure | ---------------------- | | Cadre Non-Cadre All the rules parent rules have been duplicated into the 2 remaining structures, cadre and non-cadre. There were a lot of parent-children relations between the rules that have been adapted to the new model. - l10n_in_hr_payroll: There was a lot of rules in data, and a structure in demo data, which was using 4 or 5 of these rules. As the rules doesn't seem to make a lot of sense altogether, everything was moved in demo data. 6/ Introduce a new Salary Structure Type model Currently we have a model hr.contract.type with a M2O on the contracts. This has never been used in 9 years and is removed in this commit. On the other hand, we would like to define a new model hr.payroll.structure.type (eg: CP200 Employee), which will line all the salary structures the Belgian localization could bring (Classic salary, double holidays, 13th month, ...). This field is defined on the structure, and is displayed on the contract (as the same place than the contract type we just removed). On this model we could also define some fields like: - The default pay period: Selection field, default = monthly. This is applied on the contract when selecting the structure. - The Working Schedule, m2o. This is applied on the contract when selecting the structure For example, on the 'commission paritaire' for teachers, we could set the default pay period to 'Every 15 days' and the working schedule to '19 hours / week'. Every contract under this structure would take those values. Migration ========= For a migration point of view: - All the rules that had a parent_rule_id should be set to appears_on_payslip=False. The column parent_rule_id can be dropped afterward. - All the rules that are coming from a parent structure or higher should be duplicated and the field 'struct_id' should be set on the current structure. The column parent_id can be dropped afterward. - All the rules that were defined on the structure should have the field 'struct_id' defined on them. - The rules that are not linked to a structure should be unlinked. - The column type_id on the contract could be dropped, no need to keep the values too. - A default structure type is defined in data ('Employee'). This could be set to all the existing structure for the newly created 'type_id' field. TaskID: 1942832
2018-05-04[IMP] hr_contract: Add a access right group on contractsYannick Tivisse
Some private information are on the contracts. Add a special group to display the contracts, independant of the other HR access rights.
2016-09-20[FIX] hr_contract: Allow a employee user to read contractsYannick Tivisse
2016-09-02[FIX] all: remove external ids fakely from baseMartin Trigaux
Several modules defines records with the external ID `base.foo_bar` while it is created inside this module (typically menus and groups). While there is no technical reasons to do so but this may introduce issues: - these records will not be deleted during uninstall - if a language is loaded before the installation of the module, it won't be translated The uninstallation will only remove the records with an external id linked to this module (these would only be removed when removing base). Installing a language before the module will drop the translations not linked to an existing external id (as it can not be resolved). This commit correct all the external ids tagged as from base or other incorrect modules.
2015-11-03[FIX] hr_contract: access on resource.calendar.attendance for HR officerAdrien Peiffer (ACSONE)
Add ACL on resource.calendar.attendance for HR Officer according access right on resource.calendar Otherwise, this isn't possible for HR officers to manage Work Details (`resource.calendar.attendance`), while they can manage Resource Calendar (`resource.calendar`) Closes #9330
2011-12-12[IMP] Security Rule: removed duplicates due to inheritancies of groupsFabien Pinckaers
bzr revid: fp@tinyerp.com-20111212181113-mhnnbps3ip8ls6pp
2011-07-11[IMP] hr_contract: changed passport into char field and removed useless objectQuentin (OpenERP)
bzr revid: qdp-launchpad@openerp.com-20110711170401-q71lycboq23izgnv
2011-03-22[IMP] remove hr.contract.wage.type.period.user from security file and ↵psi (Open ERP)
comment all appearance of the object from view file bzr revid: psi@tinyerp.co.in-20110322130811-ps38kxglfwqqkx59
2011-03-09[IMP] hr_contract:added access rights for hr.passport objectmtr
bzr revid: mtr@mtr-20110309062231-ea2huggnqk8qgchg
2011-03-07[IMP] hr_payroll,hr_contract:commented 'hr.contract.wage.type' and improved ↵mtr
strings of menuitem in payroll. bzr revid: mtr@mtr-20110307112817-f3c7o3fro4oxzejn
2010-12-29[FIX] HR sign in/sign outFrançois Degrave
bzr revid: fde@openerp.com-20101229123900-mxl4umxn1tqjjpar
2010-12-29[IMP+FIX] HR access rights, product marginFrançois Degrave
bzr revid: fde@openerp.com-20101229081804-ci2v2t9fhtmc1d3d
2010-10-07[MOD/IMP] hr_* : ↵AMP (OpenERP)
hr,hr_attendance,hr_contract,hr_expence,hr_timesheet,hr_timesheet_invoice,hr_timesheet_sheet Usability improvement in access rights bzr revid: amp@tinyerp.com-20101007094729-1sdtsxube9ti5lw2
2010-10-07[MOD/IMP] hr_* : Usability Improvement in AccessrightsDBR (OpenERP)
bzr revid: dbr@tinyerp.com-20101007071157-z52414z1sz9h85qh
2010-10-06[MOD/IMP] hr_contract : Usability Improvement in AccessrightsDBR (OpenERP)
bzr revid: dbr@tinyerp.com-20101006123108-zdrz31iewg7xfpvq
2010-09-18[MOD]hr_*: usability improvementAMP (OpenERP)
bzr revid: amp@tinyerp.com-20100918073924-3020grhwot6v837w
2010-09-11[MOD]hr_*: usability improvement in access rightsAMP (OpenERP)
bzr revid: amp@tinyerp.com-20100911131911-7k4g0r1b4kta30cc
2010-09-01[MOD] project_timesheet,hr_* : usability improvement in access rightsAMP (OpenERP)
bzr revid: amp@tinyerp.com-20100901132905-hslnywxf4zxogxdo
2010-08-13[MOD/IMP] hr_* : Improvement in access rightsAMP(Open ERP)
bzr revid: vir@tinyerp.com-20100813133645-w8nex9k1he2zjq9h
2010-08-04[MOD/IMP]hr_* modules access right changes in configurationDBR (OpenERP)
bzr revid: dbr@tinyerp.com-20100804133252-vh4vbkhmvsev0pnw
2010-08-04[MOD] hr_contract,hr_payroll : Modification in access rightsVir (Open ERP)
bzr revid: vir@tinyerp.com-20100804061834-jijidg5kujy8ckex
2010-08-03[MOD] hr_* :Improvement in hr_* modules groups and accessrightDBR (OpenERP)
bzr revid: dbr@tinyerp.com-20100803131117-jkvf2a7pe955en2u
2010-06-13fix_and_better_access_rightsFabien Pinckaers
bzr revid: fp@tinyerp.com-20100612220005-4a33xqgs8bvvoa7x
2010-03-08[ADD] hr_contract: Added security rules for hr_contract.uco (OpenERP)
bzr revid: uco@tinyerp.co.in-20100308133244-h1jt52bb9juj47n1
2010-02-16[FIX]:fix a bug related to the twise Marital statusMantavya Gajjar
complete move to hr module instead of hr_contract lp bug: https://launchpad.net/bugs/520992 fixed bzr revid: mga@tinyerp.com-20100216070246-jq8d9zf6aogz1lt8
2008-10-21fix access rulesChristophe Simonis
bzr revid: christophe@tinyerp.com-20081021153441-af1qtobtazu7rs28
2008-10-17fix and complete access rulesChristophe Simonis
bzr revid: christophe@tinyerp.com-20081017170345-4gw81edzvd2yjtyw
2008-10-17fix and complete access rulesChristophe Simonis
bzr revid: christophe@tinyerp.com-20081017162038-kzsgroivk73t0vyx
2008-10-17fix and complete access rulesChristophe Simonis
bzr revid: christophe@tinyerp.com-20081017084109-i1r4zigf7wp3o6i5
2008-09-10fix errors preventing installationChristophe Simonis
bzr revid: christophe@tinyerp.com-20080910122034-vcq41c249oz4zqwu
2008-09-04Better Security RulesFabien Pinckaers
bzr revid: fp@tinyerp.com-20080903224650-u1oadqv9x75atmyl
2008-09-03Improved SecurityFabien Pinckaers
bzr revid: fp@tinyerp.com-20080903180400-df7l6wxg1zpirmmi