Skip to content

Commit

Permalink
0.7.1: adding contacts to proposals
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Bendtsen committed Aug 18, 2024
1 parent 1fd078e commit 5fc3247
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
Binary file added dist/dolibarrpy-0.7.1.tar.gz
Binary file not shown.
19 changes: 18 additions & 1 deletion dolibarrpy/Dolibarrpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1583,10 +1583,27 @@ def validate_proposal_by_pid(self, objid, notrigger = 0):
proposalsValidateModel = {
"notrigger": notrigger
}

result = self.call_action_api('proposals', objid=objid, action='validate', params=proposalsValidateModel)
return result

def proposal_add_contact(self, objid, contactid, type):
"""
@endpoint 'post /proposals/{id}/contact/{contactid}/{type}
Add a contact type of given commercial proposal
@id int Id of commercial proposal to update
@contactid int Id of contact to add
@type str Type of the contact (BILLING, SHIPPING, CUSTOMER)
@return: array JSON with result
"""
if self.debug:
ic()
ic(objid)
ic(contactid)
ic(type)
action = "contact/" + str(contactid) + "/" + str(type)
result = self.call_action_api('proposals', objid=objid, action=action)
return result

# ORDERS
def find_all_orders(self, from_OrderFilter = None):
"""
Expand Down
2 changes: 1 addition & 1 deletion implementation_status.csv
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
0 put /proposals/{id}
1 post /proposals/{id}/close
0 delete /proposals/{id}/contact/{contactid}/{type}
0 post /proposals/{id}/contact/{contactid}/{type}
1 post /proposals/{id}/contact/{contactid}/{type}
0 post /proposals/{id}/line
1 get /proposals/{id}/lines
0 post /proposals/{id}/lines
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.7.0",
version="0.7.1",
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 5fc3247

Please sign in to comment.