mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP]pms-api_rest: added folio PATCH to write internal_comment
This commit is contained in:
@@ -432,6 +432,25 @@ class PmsFolioService(Component):
|
||||
|
||||
return folio.id
|
||||
|
||||
@restapi.method(
|
||||
[
|
||||
(
|
||||
[
|
||||
"/p/<int:folio_id>",
|
||||
],
|
||||
"PATCH",
|
||||
)
|
||||
],
|
||||
input_param=Datamodel("pms.folio.info", is_list=False),
|
||||
auth="jwt_api_pms",
|
||||
)
|
||||
def update_folio(self, folio_id, pms_folio_info):
|
||||
folio = self.env["pms.folio"].browse(folio_id)
|
||||
if folio:
|
||||
folio.write({"internal_comment": pms_folio_info.internalComment})
|
||||
else:
|
||||
raise MissingError(_("Folio not found"))
|
||||
|
||||
@restapi.method(
|
||||
[
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user