odoo-shopinvader icon indicating copy to clipboard operation
odoo-shopinvader copied to clipboard

[14.0][FIX] shopinvader_membership subscribe

Open acsonefho opened this issue 4 years ago • 9 comments

acsonefho avatar Dec 15 '21 13:12 acsonefho

@acsonefho a little bit of explanation would not hurt ;)

So this fixes the following error:

RESTFULL call to url https://***/shopinvader/membership/226226/subscribe with method POST and params {'membership_product_id': 226226} raise the following error 500 Internal Server Error: subscribe() got an unexpected keyword argument 'membership_product_id'

sbidoul avatar Dec 20 '21 15:12 sbidoul

@acsonefho What's the status of this ??

rousseldenis avatar Feb 11 '22 08:02 rousseldenis

LGTM. Test are red, though. Can you post a screenshot of the swagger ?

BTW, I take the opportunity to remind that these services exposing standard Odoo or OCA features that are not related to shopinvader don't need a dependency on shopinvader, they just need to depend on base_rest and use authenticated_partner_id in the service context. Which also mean they can go in OCA, like https://github.com/OCA/event/pull/247 (event) and https://github.com/OCA/helpdesk/pull/270 (helpdesk_mgmt).

sbidoul avatar Mar 21 '22 16:03 sbidoul

LGTM. Test are red, though. Can you post a screenshot of the swagger ?

image

acsonefho avatar Mar 21 '22 16:03 acsonefho

Do we need to keep the GET /{_id}/subscribe for backward compatibility ? If yes, can you please add a note in the docs saying it is deprecated. A GET must never have side effects.

sbidoul avatar Mar 21 '22 17:03 sbidoul

And can you show a screenshot of the input form swagger is creating for the POST ? I'm not entirely fluent in cerberus :)

sbidoul avatar Mar 21 '22 17:03 sbidoul

And can you show a screenshot of the input form swagger is creating for the POST ? I'm not entirely fluent in cerberus :)

image

Do we need to keep the GET /{_id}/subscribe for backward compatibility ?

I update the documentation. I update the GET with a deprecated (+ also add a warning into logs when this GET is used).

acsonefho avatar Mar 22 '22 06:03 acsonefho

@acsonefho

rousseldenis avatar May 11 '22 08:05 rousseldenis

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

github-actions[bot] avatar Mar 31 '24 12:03 github-actions[bot]