Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AFC-1369 - upgrade partner links #331

Closed
FredrikArvas opened this issue Nov 3, 2020 · 13 comments
Closed

AFC-1369 - upgrade partner links #331

FredrikArvas opened this issue Nov 3, 2020 · 13 comments
Assignees
Labels
enhancement New feature or request

Comments

@FredrikArvas
Copy link
Member

FredrikArvas commented Nov 3, 2020

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

  • no need to link each partner to each link-card with the "server action"
  • ability to display a dynamic content of the link (like customer ID or Social Security Number)

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:

@FredrikArvas FredrikArvas added the enhancement New feature or request label Nov 3, 2020
@FredrikArvas FredrikArvas changed the title AFC-XXX - AFC-1369 - upgrade partner links Nov 3, 2020
@iammiracle
Copy link

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

@FredrikArvas
Copy link
Member Author

Can we speak about it?

@FredrikArvas
Copy link
Member Author

I am available from now and two hours.

@iammiracle
Copy link

Yes we can. I am available now

@iammiracle
Copy link

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
Copy link
Member Author

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
Copy link

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
Copy link
Member Author

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
Copy link

Yes. Correct

@FredrikArvas
Copy link
Member Author

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

@iammiracle
Copy link

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

@FredrikArvas
Copy link
Member Author

This module works as expected! Thanks a lot

@FredrikArvas
Copy link
Member Author

A new version has been developed by Robin
#378

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants