Skip to content

Commit

Permalink
0.6.4: Adding note_public to API calls when closing the proposal. REQ…
Browse files Browse the repository at this point in the history
…UIRES Dolibarr >= 20.x?
  • Loading branch information
Jon Bendtsen committed Aug 17, 2024
1 parent 3be0dd2 commit b0ed5b0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
19 changes: 15 additions & 4 deletions dolibarrpy/Dolibarrpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1487,6 +1487,10 @@ def close_proposal_by_pid(self, objid, proposalsCloseModel):
Close (Accept or refuse) a quote / commercial proposal
@return: proposal
"""
if self.debug:
ic()
ic(objid)
ic(proposalsCloseModel)
objid = str(objid)
trigger_defined = proposalsCloseModel.get('notrigger')
if trigger_defined is None:
Expand All @@ -1495,18 +1499,25 @@ def close_proposal_by_pid(self, objid, proposalsCloseModel):
result = self.call_action_api('proposals', objid=objid, action='close', params=proposalsCloseModel)
return result

def proposal_rejected(self, objid, note_private = "" ):
def proposal_rejected(self, objid, note_private = "", note_public=""):
if self.debug:
ic()
ic(objid)
ic(note_private)
ic(note_public)
params = {
"status": 3,
"note_private": note_private
"note_private": note_private,
"note_public": note_public
}
result = self.close_proposal_by_pid(objid=objid, proposalsCloseModel=params)
return result

def proposal_accepted(self, objid, note_private = "" ):
def proposal_accepted(self, objid, note_private = "", note_public=""):
params = {
"status": 2,
"note_private": note_private
"note_private": note_private,
"note_public": note_public
}
result = self.close_proposal_by_pid(objid=objid, proposalsCloseModel=params)
return result
Expand Down
2 changes: 1 addition & 1 deletion implementation_status.csv
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
0 delete /proposals/{id}
1 get /proposals/{id}
0 put /proposals/{id}
0 post /proposals/{id}/close
1 post /proposals/{id}/close
0 delete /proposals/{id}/contact/{contactid}/{type}
0 post /proposals/{id}/contact/{contactid}/{type}
0 post /proposals/{id}/line
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
setup(
name='dolibarrpy',
packages=['dolibarrpy'],
version="0.6.3",
version="0.6.4",
license='MIT',
description='Python wrapper for Dolibarr API',
long_description='This project is a python wrapper for the API for Dolibarr ERP & CRM found at dolibarr.org. It is not yet complete, but most major GET endpoints has been implemented. In the beginning I will mostly focus on implementing the API endpoints that I use.',
Expand Down

0 comments on commit b0ed5b0

Please sign in to comment.