vertelab / odoo-af

2 stars 5 forks source link

AFC-1369 - upgrade partner links #331

Closed FredrikArvas closed 3 years ago

FredrikArvas commented 3 years ago

Userstory: As a user, I want a link to a specific Jobseeker in the target-system

this module was developed in this Issue: https://github.com/08arvasi/odoo-af/issues/9

We now want a re-factoring to enable

We think this can be achieved with JavaScript in the kanban-card.

Module name: odoo-af/contact_links Old module: https://github.com/vertelab/odoo-af/tree/Dev-12.0/contact_links

Test-steps: Start-image: image

Install the module Enable "Link Admin" on the current user Got to Server Action -> "Update Link"-> "Create Contextual Action". Go to a Contact -> "Action" -> "Update link" Expected behavior = Visible links on a "link"-tab image

Admin of links: Contacts -> Configuration -> LinkAdmin

Branch name: 12.0-AFC-1369-upgrade partner links

Description: This module changes the module to support dynamic links and to not need the linkning between res.partner and contact_link

Estimate: (added by developers only) Estimated Hours: Estimated Date: Actual Hours:

iammiracle commented 3 years ago

Hi @FredrikArvas, I am not very clear on this issue.

FredrikArvas commented 3 years ago

Can we speak about it?

FredrikArvas commented 3 years ago

I am available from now and two hours.

iammiracle commented 3 years ago

Yes we can. I am available now

iammiracle commented 3 years ago

Hi @FredrikArvas after careful examination, I have been able to make sure the Links show automatically without the update, but the dynamic content of the link, will have to update the link model once a contact is opened, but the links here, I really don't know where to add the customerID, see link example:

https://elin.arbetsformedlingen.se/elin/?PNR= https://www.arbetsformedlingen.se/For-arbetssokande/Valj-yrke/Intresseguide/ https://pisasso.arbetsformedlingen.se/cleartrust/iwa/ct_home.asp?CT_ORIG_URL=http://ivs.arbetsformedlingen.se/etjanst/planeringsverktyg/#/start/bedomning

So if it is not uniform, like adding the customerId to the end of the link or a defined place, it might be difficult.

See PR - #343

FredrikArvas commented 3 years ago

the current design has a three-part structure of the link. 1 First static part 2 middle dynamic part 3 Last static part. And these are then calculated to the "link"-field image

Does this make any sense? Does it help?

iammiracle commented 3 years ago

I understand @FredrikArvas but this approach wont work. Here is what I think.

If you check sales order, the line items are always created every time a new SO is to be created and the SO line has a link with the SO. So I will propose that path.

The Links you have on Link Administration will still be there, but I will create another model that will link to the present links and will be create once a partner is to be opened or created, if the link for the partner already exist, it wont be created. Then the link computation will be made from this proposed new model.

Let me know what you think

FredrikArvas commented 3 years ago

Does it help to know that these links only will contain data from the res-partner-model? So the link and the "dynamic content" will be in the same place.

iammiracle commented 3 years ago

Yes. Correct

FredrikArvas commented 3 years ago

Did my answer solve your question so you can continue, or do you need something from me now?

iammiracle commented 3 years ago

Yeah, it does. I have updated the PR. It can now be tested

FredrikArvas commented 3 years ago

This module works as expected! Thanks a lot

FredrikArvas commented 3 years ago

A new version has been developed by Robin https://github.com/vertelab/odoo-af/pull/378