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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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.

process_report/invoices/invoice.py Outdated Show resolved Hide resolved
@QuanMPhm QuanMPhm force-pushed the 100/declare_exported_col branch 2 times, most recently from fb133a6 to bfe8192 Compare September 30, 2024 14:05
… 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.
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