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

acquisition: create invoice resource #729

Merged
merged 1 commit into from
Mar 23, 2020

Conversation

lauren-d
Copy link
Contributor

@lauren-d lauren-d commented Feb 3, 2020

  • Adds acquisition invoice resource.
  • Adds a function to check if invoice exists before deleting a vendor.
  • Adds more currencies to vendors.
  • Adds fixtures for tests units.
  • Updates tests for vendors.

Co-Authored-by: Lauren-D [email protected]

Why are you opening this PR?

How to test?

There is no way to test backend at this time

Code review check list

  • Commit message template compliance.
  • Commit message without typos.
  • File names.
  • Functions names.
  • Functions docstrings.
  • Unnecessary commited files?

@lauren-d lauren-d force-pushed the lau-#1245-create-invoice-resource branch from 36c7767 to e9918e2 Compare February 3, 2020 12:31
@lauren-d lauren-d force-pushed the lau-#1245-create-invoice-resource branch 2 times, most recently from ed0a605 to 4051f67 Compare February 4, 2020 07:59
@lauren-d lauren-d requested a review from sebdeleze February 4, 2020 08:01
Comment on lines +30 to +34
"title": "Acquisition order line",
"type": "object",
"properties": {
"$ref": {
"title": "Acquisition order line URI",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about simplifiying with Order line instead of Acquisition order line?

Comment on lines +41 to +45
"title": "Acquisition account",
"type": "object",
"properties": {
"$ref": {
"title": "Acquisition account URI",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just Account? (same thing as previously and for all Acquisition some words to some words everywhere).

Comment on lines +75 to +74
"ger",
"spa"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there no way to list all possible languages? What happens the day where a new vendor is an arabic one? Chinese one? Etc.

@@ -230,8 +234,11 @@
"type": "string",
"enum": [
"CHF",
"CAD",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as languages: how could we display all known currencies?

@lauren-d lauren-d force-pushed the lau-#1245-create-invoice-resource branch 3 times, most recently from 61ae3f3 to bb1febe Compare February 24, 2020 15:52
@lauren-d lauren-d requested a review from jma March 2, 2020 09:54
@lauren-d lauren-d force-pushed the lau-#1245-create-invoice-resource branch from bb1febe to 5f0d8de Compare March 2, 2020 10:04
@@ -55,17 +57,24 @@ class Vendor(IlsRecord):

def get_number_of_acq_orders(self):
"""Get number of acq orders."""
from ..acq_orders.api import AcqOrdersSearch
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method can be a class method.

return AcqOrdersSearch().filter(
'term', vendor__pid=self.pid).source().count()

def get_number_of_acq_invoices(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can be a class method

@lauren-d lauren-d force-pushed the lau-#1245-create-invoice-resource branch from 5f0d8de to 92bc265 Compare March 5, 2020 10:35
@lauren-d lauren-d force-pushed the lau-#1245-create-invoice-resource branch 3 times, most recently from 101bf53 to f1f371c Compare March 19, 2020 11:40
* Adds acquisition invoice resource.
* Adds a function to check if invoice exists before deleting a vendor.
* Adds more currencies to vendors.
* Adds fixtures for unit tests.
* Updates tests for vendors.

Co-Authored-by: Lauren-D <[email protected]>
@lauren-d lauren-d force-pushed the lau-#1245-create-invoice-resource branch from f1f371c to 64d6b58 Compare March 23, 2020 15:25
@lauren-d lauren-d merged commit d7ad31b into rero:dev Mar 23, 2020
@lauren-d lauren-d deleted the lau-#1245-create-invoice-resource branch July 2, 2020 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants