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

Allow invoice subclasses to explicitly declare their exported columns and column names #105

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

QuanMPhm
Copy link
Contributor

Closes #100. Two class attributes, export_columns_list and exported_columns_map, has been added to Invoice, along with a class function _filter_columns(). Subclasses of Invoice must now define export_columns_list, containing the ordered list of columns that must be exported in their respective invoices. Subclasses can optional define exported_columns_map, containing mappings between "internal" column names and what their name should be when exported.

The field name RATE_FIELD has been added to invoice.py. It was previously forgotten.

@QuanMPhm QuanMPhm force-pushed the 100/declare_exported_col branch from aacb054 to b5ca684 Compare September 25, 2024 18:32
process_report/invoices/invoice.py Outdated Show resolved Hide resolved
@QuanMPhm QuanMPhm force-pushed the 100/declare_exported_col branch 3 times, most recently from bfe8192 to e616718 Compare September 30, 2024 14:15
@QuanMPhm QuanMPhm requested a review from knikolla September 30, 2024 14:16
@QuanMPhm QuanMPhm force-pushed the 100/declare_exported_col branch from e616718 to f29a39b Compare October 8, 2024 15:18
… and column names

Two class attributes, `export_columns_list` and `exported_columns_map`,
has been added to `Invoice`, along with a class function `_filter_columns()`.
Subclasses of `Invoice` must now define `export_columns_list`, containing
the ordered list of columns that must be exported in their respective
invoices. Subclasses can optional define `exported_columns_map`,
containing mappings between "internal" column names and what their
name should be when exported.

The field name `RATE_FIELD` has been added to `invoice.py`. It was
previously forgotten.
@QuanMPhm QuanMPhm force-pushed the 100/declare_exported_col branch from f29a39b to 3e2a7dc Compare October 8, 2024 15:20
@QuanMPhm QuanMPhm merged commit 244be32 into CCI-MOC:main Oct 21, 2024
3 checks passed
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.

Allow invoices to explicitly declare their exported columns
3 participants