vertelab / odoo-af

2 stars 5 forks source link

AFC-AFC-2443 [IMP] Hide menues in DAFA #631

Open fredrikarvas-vertel opened 3 years ago

fredrikarvas-vertel commented 3 years ago

Userstory: As a user, I only want to see the right menues.

(Note: this module uses exact match on the groups, it does not use inheriance of grups)

1 Discuss = Remove the group "Internal user", add "group_no_one". Calendar Remove the group "Internal user", add "group_no_one". Employees = Remove the group "Internal user" Leaves = Remove the group "Internal user", add "group_no_one". Project = Replace Project Manager with "Disable-Hide-DAFA-Menues".

2 The code you have created works fine for adding only one user-group to a menu. But if there are more then one, it does not work on our servers. :-( image image image

Development Branch name: Dev-12.0-AFC-2443-hide-menues

Target Branch name: https://github.com/vertelab/odoo-af/tree/Dev-12.0-Fenix-Sprint-02

Test-steps: Usergroups are defined here. https://github.com/vertelab/odoo-base/blob/Dev-12.0-Fenix-Sprint-02/base_user_groups_dafa/security/security.xml

1 login with a user that only has the Interpreter Accountant "interpreter_accountant" "tolkadmin@test.se / test = The user should only see

2 Login with a user that manages Employees "group_dafa_employees_write" anstallda@test.se / test = The user should only see

3 Login with a user that manages Organisation "group_dafa_org_admin_write" organisation@test.se / test = The user should only see

4 Login with a user that manages Participants "group_dafa_participants_write" deltagare@test.se / test = The user should only see

5 Login with a user that manages Accounting "group_dafa_admin_accounting_read" ekonomi@test.se / test = The user should only see

6 Allow "1_line_support" to see all

Description to the manifest: AFC-2343b updates the menues user-groups.

Estimate: (@developers: Add your times here, not in comments please) Estimated Hours: 4-5 Hours Estimated Date: 05-06-2021 Actual Hours:

AnilKesariya commented 3 years ago

@FredrikArvas : I've added estimated hours do let me know if i can start work on it.

Regards,

fredrikarvas-vertel commented 3 years ago

HI @AnilKesariya Please explain why this is so time consuming. I was execting less then one hour. What did I miss? :-)

fredrikarvas-vertel commented 3 years ago

@AnilKesariya Please create the users from the Employee-menu and assign user-rights only from DAFA Groups image

AnilKesariya commented 3 years ago

@FredrikArvas : This changes need to add in sale_outplacement? or somewhere else?

fredrikarvas-vertel commented 3 years ago

Yes please.

AnilKesariya commented 3 years ago

@FredrikArvas : point 1 is completed in 1 hour, point 2 is not clear to me. to create an employee I need a working SSN no. I followed this format but it does not work for SSN. YY-MM-DD-XXXX. today I will test this with Anusha for point 1. point 2 we will discuss on today's scrum meeting.

fredrikarvas-vertel commented 3 years ago

Use this service: https://www.personnummer.nu/ The format is: YYMMDD-XXXX or YYMMDD-XXXX or YYYYMMDDXXXX or or YYYYMMDDXXXX Here are a few:

19700101-4260 19750101-0370 19800101-6388 19850101-1699 19900101-6188 19950101-0194

AnilKesariya commented 3 years ago

It gives me this warning when I try any of the following number : Wrong SSN format. Should be 12 numbers (199010241234).

AnilKesariya commented 3 years ago

It worked after removing '-' sign from your number list. thanks.

AnilKesariya commented 3 years ago

@FredrikArvas @Radhika435

I've created https://github.com/vertelab/odoo-outplacement/pull/240 for this issue.

Point 1 is submitted and point 2 is already working. Recorded video

Regards, Anil

Anushalewis commented 3 years ago

2443 test results.docx Test results , The hidden menues are still appearing

AnilKesariya commented 3 years ago

Hi @Anushalewis:

Is the requirement updated? as we've earlier hide few menus and made them visible on debug mode only, If these are the changes to be apply then could define the changes of each group inside user setting? will be more clear to apply.

Regards,

AnilKesariya commented 3 years ago

@Anushalewis : Can you write a which access rights/group you are assigning when creating an employee? It will help me to understand for which group of user which menus to make visible. at this moment. you have presented email address.

fredrikarvas-vertel commented 3 years ago

@AnilKesariya I added a link to the usergroups in the description above: https://github.com/vertelab/odoo-base/blob/Dev-12.0-Fenix-Sprint-02/base_user_groups_dafa/security/security.xml

Anushalewis commented 3 years ago

@AnilKesariya : Please find attached word document have added couple more screen shots with the group info. 2443.test.results.docx

AnilKesariya commented 3 years ago

Hi @FredrikArvas & @Anushalewis

I've completed first 4 points from the description and shared video link below.

  1. Interpreter Group - https://www.loom.com/share/68a2a7a2aac749b49698e4206af20b3f

  2. group_dafa_employees_write : https://www.loom.com/share/f068fbafc22d4e2e8096f206090b2c3a

2 & 4 same Group : https://www.loom.com/share/51eeaa02c90f4e598ddd72cb25ebd8fd (Group 4 is not corrected to handle jobseekers)

5 & 6 needs to be discuss because, 5 : when we assign accounting dafa read from employee view, then it takes the basic permission of employee which does not allow to get in into system. I just want to confirm with you that we also need to make changes on updates of assigning a group when we change the group from employee screen. //FA: Yes. When we assign a new user-rights from the Employee-form, it should override any other changes done from the "User-settings"-form.

To make point number 5 work, we need to assign the following groups when applying the user-rights from the Employee-screen: Internal Group, Billing in accounting, All leads on sales & Accounting Dafa read. //FA: Please make these groups to be inherited in https://github.com/vertelab/odoo-base/blob/862ab2385b9618de6bc8eefe1f6b1cd766abf4e9/base_user_groups_dafa/security/security.xml#L97

  1. Where just written all menus to show, could you list out which menu contains in all menus? //FA: Could we add the "Disable the Hide-menu"-group to Service-Desk1-group?

Let me know @FredrikArvas, If I can create PR with existing changes that I made, the changes applied in sale_outplacement and base_user_groups_dafa

Best, Anil

fredrikarvas-vertel commented 3 years ago

@AnilKesariya I have commented above.

AnilKesariya commented 3 years ago

I see, you have updated group for point 4. that I will check and update. about point 5 do you want me to set the required group to be auto enable from employee screen when apply that group to show expected menus? About point 6 is not clear to me. should I auto assign disable dafa hide group to user for piont 6? so all the disabled menu would be appear to this user.

fredrikarvas-vertel commented 3 years ago

Point 4 = thanks Point 5 = yes please Point 6 = yes please

AnilKesariya commented 3 years ago

Ok Fredrik.

AnilKesariya commented 3 years ago

Hi @FredrikArvas : I've create PR : https://github.com/vertelab/odoo-outplacement/pull/280

AnilKesariya commented 3 years ago

There is also changes in base_user_groups_dafa : so I will also create a PR on odoo-base repository too for some changes into base definition of groups.

AnilKesariya commented 3 years ago

Here is another PR on odoo-base for same task : https://github.com/vertelab/odoo-base/pull/351

Anushalewis commented 3 years ago

@AnilKesariya : Please find the attached screen shots , The test scenarios are still failing 2443.test.results july 20.docx