endi.models.task package¶
Subpackages¶
- endi.models.task.services package
- Submodules
- endi.models.task.services.estimation module
- endi.models.task.services.invoice module
- endi.models.task.services.invoice_official_number module
- endi.models.task.services.payment module
- endi.models.task.services.task module
DiscountLineServiceInternalProcessServicePostTTCLineServiceTaskLineGroupServiceTaskLineServiceTaskLineService.duplicate()TaskLineService.from_price_study_product()TaskLineService.from_price_study_work()TaskLineService.from_price_study_work_item()TaskLineService.from_sale_product()TaskLineService.from_sale_product_work_item()TaskLineService.gen_cancelinvoice_line()TaskLineService.on_before_commit()
TaskServiceTaskService.cache_totals()TaskService.create()TaskService.duplicate()TaskService.find_task_status_date()TaskService.format_amount()TaskService.get_customer_task_factory()TaskService.get_rate()TaskService.get_rate_level()TaskService.get_task_class()TaskService.get_tva_objects()TaskService.get_valid_estimations()TaskService.get_valid_invoices()TaskService.get_waiting_estimations()TaskService.get_waiting_invoices()TaskService.json_totals()TaskService.modelsTaskService.on_before_commit()TaskService.post_duplicate()TaskService.query_by_antenne_id()TaskService.query_by_follower_id()TaskService.query_by_validator_id()TaskService.set_price_study()TaskService.set_progress_invoicing_plan()TaskService.total_estimated()TaskService.total_income()TaskService.unset_price_study()TaskService.unset_progress_invoicing_plan()
find_internal_product_and_tva()
- endi.models.task.services.task_mentions module
- Module contents
Submodules¶
endi.models.task.actions module¶
This module contains
Action managers handling status changes for Sale documents
Callbacks fired when the documents status are changed (official number,
remote internal document generation …)
- endi.models.task.actions.estimation_valid_callback(request, task, **kw)¶
Estimation validation callback
- Paramètres:
request (obj) – The current pyramid request
task (obj) – The current context
- endi.models.task.actions.get_internalcancelinvoice_state_manager() ActionManager¶
Construit le state manager pour les avoirs internes
- endi.models.task.actions.get_internalestimation_state_manager() ActionManager¶
Renvoie un state manager pour les devis internes
- endi.models.task.actions.get_internalinvoice_state_manager() ActionManager¶
Construit le state manager pour les factures internes
- endi.models.task.actions.get_signed_status_actions()¶
Return actions available for setting the signed_status attribute on Estimation objects
- endi.models.task.actions.internalestimation_valid_callback(request, task, **kw)¶
InternalEstimation validation callback
- Paramètres:
request (obj) – The current pyramid request
task (obj) – The current InternalEstimation
- endi.models.task.actions.internalinvoice_valid_callback(request, task, **kw)¶
Invoice validation callback
- Paramètres:
request (obj) – The current pyramid request
task (obj) – The current context
- endi.models.task.actions.invoice_valid_callback(request, task, **kw)¶
Invoice validation callback
- Paramètres:
request (obj) – The current pyramid request
task (obj) – The current context
endi.models.task.estimation module¶
The estimation model
- class endi.models.task.estimation.Estimation(user, company, project, **kw)¶
Bases :
TaskEstimation Model
- add_default_payment_line()¶
- address¶
- all_lines¶
- auto_validated¶
- business¶
- business_id¶
- business_type¶
- business_type_id¶
- check_signed_status_allowed(status, request, **kw)¶
- children¶
- company¶
- company_id¶
- company_index¶
- created_at¶
- customer¶
- customer_id¶
- date¶
- decimal_to_display¶
- deposit¶
- deposit_amount_ttc()¶
- deposit_amounts_native()¶
- description¶
- discounts¶
- display_ttc¶
- display_units¶
- end_date¶
- estimation_computer = None¶
- expenses¶
- expenses_ht¶
- exports¶
- file_requirements¶
- files¶
- first_visit¶
- frozen_settings¶
- gen_business()¶
Generate a business based on this Task
- Renvoie:
A new business instance
- Type renvoyé:
- gen_deposit_invoice(request, user)¶
Generate a deposit invoice based on the current estimation
- Paramètres:
user (obj) – User instance, the user generating the document
- Type renvoyé:
class:Invoice
- gen_invoice(request, payment_line, user)¶
Generate an invoice based on a payment line
- Paramètres:
payment_line (obj) – The payment line we ask an Invoice for
user (obj) – User instance, the user generating the document
- Type renvoyé:
class:Invoice
- geninv¶
- get_nb_payment_lines()¶
- property global_status¶
hook on status and paid status to update css classes representing icons :return: a String
- ht¶
- id¶
- insurance¶
- insurance_id¶
- internal_number¶
- invoices¶
- legacy_number¶
- line_groups¶
- mandatory_mentions¶
- manualDeliverables¶
- manual_payment_line_amounts()¶
- mentions¶
- mode¶
- name¶
- notes¶
- official_number¶
- owner¶
- owner_id¶
- parent: Any¶
- parent_id¶
- paymentDisplay¶
- payment_conditions¶
- payment_lines¶
- paymentline_amount_ttc()¶
- paymentline_amounts_native()¶
- payments¶
- pdf_file¶
- pdf_file_hash¶
- pdf_file_id¶
- phase¶
- phase_id¶
- post_ttc_lines¶
- price_study¶
- progress_invoicing_plan¶
- project¶
- project_id¶
- project_index¶
- round_floor¶
- set_default_validity_duration()¶
Set last validity duration used by the company or CAE default config if none
- set_signed_status(status, request, **kw)¶
set the signed status of a task through the state machine
- signed_state_manager = <endi.models.action_manager.ActionManager object>¶
- signed_status¶
- sold()¶
- start_date¶
- status¶
- status_comment¶
- status_date¶
- status_user¶
- status_user_id¶
- statuses¶
- ttc¶
- tva¶
- type_¶
- update_payment_lines(request, payment_times=None)¶
- updated_at¶
- validation_state_manager = <endi.models.action_manager.ActionManager object>¶
- validation_status_history¶
- validity_duration¶
- workplace¶
- class endi.models.task.estimation.PaymentLine(**kwargs)¶
Bases :
Basepayments lines
- amount¶
- date¶
- description¶
- duplicate()¶
duplicate a paymentline
- id¶
- order¶
- task¶
- task_id¶
- endi.models.task.estimation.get_estimation_years(kw=None)¶
Return a cached query for the years we have estimations configured
- Paramètres:
kw – is here only for API compatibility
endi.models.task.insurance module¶
Modèle pour les assurances dans les devis et factures
endi.models.task.internalestimation module¶
- class endi.models.task.internalestimation.InternalEstimation(user, company, project, **kw)¶
Bases :
Estimation- address¶
- all_lines¶
- auto_validated¶
- business¶
- business_id¶
- business_type¶
- business_type_id¶
- children¶
- company¶
- company_id¶
- company_index¶
- created_at¶
- customer¶
- customer_id¶
- date¶
- decimal_to_display¶
- deposit¶
- description¶
- discounts¶
- display_ttc¶
- display_units¶
- end_date¶
- expenses¶
- expenses_ht¶
- exports¶
- file_requirements¶
- files¶
- first_visit¶
- frozen_settings¶
- geninv¶
- ht¶
- id¶
- insurance¶
- insurance_id¶
- internal = True¶
- internal_number¶
- invoices¶
- legacy_number¶
- line_groups¶
- mandatory_mentions¶
- manualDeliverables¶
- mentions¶
- mode¶
- name¶
- notes¶
- official_number¶
- owner¶
- owner_id¶
- parent: Any¶
- parent_id¶
- paymentDisplay¶
- payment_conditions¶
- payment_lines¶
- payments¶
- pdf_file¶
- pdf_file_hash¶
- pdf_file_id¶
- phase¶
- phase_id¶
- post_ttc_lines¶
- prefix = 'internal'¶
- price_study¶
- progress_invoicing_plan¶
- project¶
- project_id¶
- project_index¶
- round_floor¶
- signed_status¶
- start_date¶
- status¶
- status_comment¶
- status_date¶
- status_user¶
- status_user_id¶
- statuses¶
- supplier_order¶
- supplier_order_id¶
- sync_with_customer(request)¶
- ttc¶
- tva¶
- type_¶
- updated_at¶
- validation_state_manager = <endi.models.action_manager.ActionManager object>¶
- validation_status_history¶
- validity_duration¶
- workplace¶
endi.models.task.internalinvoice module¶
- class endi.models.task.internalinvoice.InternalCancelInvoice(user, company, project, **kw)¶
Bases :
CancelInvoice- address¶
- all_lines¶
- auto_validated¶
- business¶
- business_id¶
- business_type¶
- business_type_id¶
- children¶
- company¶
- company_id¶
- company_index¶
- created_at¶
- customer¶
- customer_id¶
- date¶
- decimal_to_display¶
- description¶
- discounts¶
- display_ttc¶
- display_units¶
- end_date¶
- expenses¶
- expenses_ht¶
- exported¶
- exports¶
- file_requirements¶
- files¶
- financial_year¶
- first_visit¶
- frozen_settings¶
- ht¶
- id¶
- insurance¶
- insurance_id¶
- internal = True¶
- internal_number¶
- invoice¶
- invoice_id¶
- invoicing_mode¶
- legacy_number¶
- line_groups¶
- mandatory_mentions¶
- mentions¶
- mode¶
- name¶
- notes¶
- official_number¶
- owner¶
- owner_id¶
- parent: Any¶
- parent_id¶
- payment_conditions¶
- payments¶
- pdf_file¶
- pdf_file_hash¶
- pdf_file_id¶
- phase¶
- phase_id¶
- post_ttc_lines¶
- prefix = 'internal'¶
- price_study¶
- progress_invoicing_plan¶
- project¶
- project_id¶
- project_index¶
- round_floor¶
- start_date¶
- status¶
- status_comment¶
- status_date¶
- status_user¶
- status_user_id¶
- statuses¶
- supplier_invoice¶
- supplier_invoice_id¶
- sync_with_customer(request)¶
- ttc¶
- tva¶
- type_¶
- updated_at¶
- validation_state_manager = <endi.models.action_manager.ActionManager object>¶
- validation_status_history¶
- workplace¶
- class endi.models.task.internalinvoice.InternalInvoice(user, company, project, **kw)¶
Bases :
Invoice- address¶
- all_lines¶
- auto_validated¶
- business¶
- business_id¶
- business_type¶
- business_type_id¶
- cancelinvoices¶
- children¶
- company¶
- company_id¶
- company_index¶
- created_at¶
- customer¶
- customer_id¶
- date¶
- decimal_to_display¶
- description¶
- discounts¶
- display_ttc¶
- display_units¶
- end_date¶
- estimation¶
- estimation_id¶
- expenses¶
- expenses_ht¶
- exported¶
- exports¶
- file_requirements¶
- files¶
- financial_year¶
- first_visit¶
- frozen_settings¶
- ht¶
- id¶
- insurance¶
- insurance_id¶
- internal = True¶
- internal_number¶
- invoice_computer = None¶
- invoicing_mode¶
- legacy_number¶
- line_groups¶
- mandatory_mentions¶
- mentions¶
- mode¶
- name¶
- notes¶
- official_number¶
- owner¶
- owner_id¶
- paid_status¶
- parent: Any¶
- parent_id¶
- payment_conditions¶
- payments¶
- pdf_file¶
- pdf_file_hash¶
- pdf_file_id¶
- phase¶
- phase_id¶
- post_ttc_lines¶
- prefix = 'internal'¶
- price_study¶
- progress_invoicing_plan¶
- project¶
- project_id¶
- project_index¶
- round_floor¶
- start_date¶
- status¶
- status_comment¶
- status_date¶
- status_user¶
- status_user_id¶
- statuses¶
- supplier_invoice¶
- supplier_invoice_id¶
- sync_with_customer(request)¶
- ttc¶
- tva¶
- type_¶
- updated_at¶
- urssaf_payment_request¶
- valid_cancelinvoices¶
- validation_state_manager = <endi.models.action_manager.ActionManager object>¶
- validation_status_history¶
- workplace¶
endi.models.task.internalpayment module¶
endi.models.task.invoice module¶
Invoice model
- class endi.models.task.invoice.CancelInvoice(user, company, project, **kw)¶
Bases :
TaskCancelInvoice model Could also be called negative invoice
- CLASSIC_MODE = 'classic'¶
- PROGRESS_MODE = 'progress'¶
- address¶
- all_lines¶
- auto_validated¶
- business¶
- business_id¶
- business_type¶
- business_type_id¶
- children¶
- company¶
- company_id¶
- company_index¶
- created_at¶
- customer¶
- customer_id¶
- date¶
- decimal_to_display¶
- description¶
- discounts¶
- display_ttc¶
- display_units¶
- end_date¶
- expenses¶
- expenses_ht¶
- exported¶
- exports¶
- file_requirements¶
- files¶
- financial_year¶
- first_visit¶
- frozen_settings¶
- property global_status¶
hook on status and paid status to update css classes representing icons :return: a Sting
- ht¶
- id¶
- insurance¶
- insurance_id¶
- internal_number¶
- invoice¶
- invoice_id¶
- invoicing_mode¶
- is_tolate()¶
Return False
- legacy_number¶
- line_groups¶
- mandatory_mentions¶
- mentions¶
- mode¶
- name¶
- notes¶
- official_number¶
- owner¶
- owner_id¶
- parent: Any¶
- parent_id¶
- payment_conditions¶
- payments¶
- pdf_file¶
- pdf_file_hash¶
- pdf_file_id¶
- phase¶
- phase_id¶
- post_ttc_lines¶
- price_study¶
- progress_invoicing_plan¶
- project¶
- project_id¶
- project_index¶
- round_floor¶
- start_date¶
- status¶
- status_comment¶
- status_date¶
- status_user¶
- status_user_id¶
- statuses¶
- ttc¶
- tva¶
- type_¶
- updated_at¶
- validation_state_manager = <endi.models.action_manager.ActionManager object>¶
- validation_status_history¶
- workplace¶
- class endi.models.task.invoice.Invoice(user, company, project, **kw)¶
Bases :
TaskInvoice Model
- CLASSIC_MODE = 'classic'¶
- PROGRESS_MODE = 'progress'¶
- address¶
- all_lines¶
- auto_validated¶
- business¶
- business_id¶
- business_type¶
- business_type_id¶
- cancelinvoice_amount()¶
- cancelinvoices¶
- check_resulted(force_resulted=False)¶
Check if the invoice is resulted or not and set the appropriate status
- children¶
- company¶
- company_id¶
- company_index¶
- compute_payments(payment_amount)¶
- created_at¶
- customer¶
- customer_id¶
- date¶
- decimal_to_display¶
- description¶
- discounts¶
- display_ttc¶
- display_units¶
- end_date¶
- estimation¶
- estimation_id¶
- expenses¶
- expenses_ht¶
- exported¶
- exports¶
- file_requirements¶
- files¶
- financial_year¶
- first_visit¶
- frozen_settings¶
- gen_cancelinvoice(request, user)¶
Return a cancel invoice with self’s informations
- get_next_row_index()¶
- property global_status¶
hook on status and paid status to update css classes representing icons :return: a Sting
- historize_paid_status(user)¶
Records the current paid_status in history
- Paramètres:
user – the user who just changed paid status.
- ht¶
- id¶
- insurance¶
- insurance_id¶
- internal_number¶
- invoice_computer = None¶
- invoicing_mode¶
- is_tolate()¶
Return True if a payment is expected since more than 45 days
- legacy_number¶
- line_groups¶
- mandatory_mentions¶
- mentions¶
- mode¶
- name¶
- notes¶
- official_number¶
- owner¶
- owner_id¶
- paid(year: Optional[int] = None)¶
return the amount that has already been paid
- Paramètres:
year – limit the considered payments to one year
- paid_status¶
- parent: Any¶
- parent_id¶
- payment_conditions¶
- payments¶
- pdf_file¶
- pdf_file_hash¶
- pdf_file_id¶
- phase¶
- phase_id¶
- post_ttc_lines¶
- price_study¶
- progress_invoicing_plan¶
- project¶
- project_id¶
- project_index¶
- round_floor¶
- set_deposit_label()¶
- set_project(project)¶
- set_sold_label()¶
- start_date¶
- status¶
- status_comment¶
- status_date¶
- status_user¶
- status_user_id¶
- statuses¶
- topay()¶
- topay_by_tvas()¶
- ttc¶
- tva¶
- tva_cancelinvoice_parts()¶
- tva_paid_parts()¶
- type_¶
- updated_at¶
- urssaf_payment_request¶
- valid_cancelinvoices¶
- validation_state_manager = <endi.models.action_manager.ActionManager object>¶
- validation_status_history¶
- workplace¶
- endi.models.task.invoice.get_invoice_years(kw=None)¶
Return a cached query for the years we have invoices configured
- Paramètres:
kw – is here only for API compatibility
endi.models.task.mentions module¶
Modèle pour les mentions dans les devis et factures
endi.models.task.options module¶
endi.models.task.payment module¶
Invoice’s payment model
- class endi.models.task.payment.BankRemittance(**kwargs)¶
Bases :
TimeStampedMixin,BaseRemises en banque
- bank¶
- bank_id¶
- closed¶
- created_at¶
- get_grouped_payments()¶
Retourne la liste des encaissements d’une remise groupés par pièce (eg: chèque qui règle plusieurs factures) pour les exports
- get_total_amount()¶
- id¶
- is_exported()¶
- payment_mode¶
- payments¶
- remittance_date¶
- updated_at¶
- class endi.models.task.payment.BaseTaskPayment(**kwargs)¶
Bases :
TimeStampedMixin,Base- amount¶
- created_at¶
- date¶
- exported¶
- exports¶
- id¶
- internal = False¶
- property invoice¶
- property parent¶
- precision = 5¶
- task¶
- task_id¶
- tva¶
- tva_id¶
- type_¶
- updated_at¶
- user¶
- user_id¶
- year¶
- class endi.models.task.payment.Payment(**kwargs)¶
Bases :
BaseTaskPaymentPayment entry
- amount¶
- bank¶
- bank_id¶
- bank_remittance¶
- bank_remittance_id¶
- check_number¶
- created_at¶
- customer_bank¶
- customer_bank_id¶
- date¶
- exported¶
- exports¶
- id¶
- issuer¶
- mode¶
- task¶
- task_id¶
- tva¶
- tva_id¶
- type_¶
- updated_at¶
- user¶
- user_id¶
endi.models.task.task module¶
Task model represents a base task, with a status, an owner, a phase
- class endi.models.task.task.DiscountLine(**kwargs)¶
Bases :
BaseA discount line
- amount¶
- description¶
- duplicate()¶
return the equivalent InvoiceLine
- classmethod from_price_study_discount(discount)¶
- get_tva()¶
- id¶
- on_before_commit(request, state, attributes=None)¶
Handle actions before commit
- Paramètres:
(default None)
- task¶
- task_id¶
- total()¶
- total_ht()¶
- tva¶
- tva_amount()¶
- class endi.models.task.task.FrozenSettingsModelMixin¶
Bases :
objectAllows to store/retrieve a frozen settings dict/list as JSON
Could be used for something else than Task
- freeze_settings()¶
- frozen_settings = Column(None, JSON(), table=None, default=ColumnDefault({}))¶
- class endi.models.task.task.PostTTCLine(**kwargs)¶
Bases :
BaseA content line that come after the invoice TTC total for information purpose only (eg: acomptes perçus non facturés, primes CEE)
- amount¶
- id¶
- label¶
- on_before_commit(request, state, attributes=None)¶
Handle actions before commit
- Paramètres:
(default None)
- task¶
- task_id¶
- class endi.models.task.task.Task(user, company, project, **kw)¶
Bases :
FrozenSettingsModelMixin,OfficialNumberMixin,ValidationStatusHolderMixin,NodeMetadata pour une tâche (estimation, invoice)
- add_default_task_line_group()¶
- add_ht_by_tva(ret_dict, lines)¶
- address¶
- all_lines¶
- property attachments¶
File that are attached to this task but not to any sale requirement
- auto_validated¶
- business¶
- business_id¶
- business_type¶
- business_type_id¶
- cache_totals(request=None)¶
Cache Task totals from outside events scope
- Paramètres:
request (obj) – The Pyramid request
- change_status(key, status)¶
fired on status change, barely logs what is happening
- check_status_allowed(status, request, **kw)¶
- children¶
- company¶
- company_id¶
- company_index¶
- computer = None¶
- created_at¶
- customer¶
- customer_id¶
- date¶
- decimal_to_display¶
- property default_line_group¶
- description¶
- discount_total_ht()¶
- discounts¶
- display_ttc¶
- display_units¶
- duplicate(request, user, **kw)¶
DUplicate the current Task
Mandatory args :
user
The user duplicating this Task
customer
project
- end_date¶
- estimation_types = ('estimation', 'internalestimation')¶
- expenses¶
- expenses_amount()¶
Expense amounts (Not used in newer Tasks)
- expenses_ht¶
- exports¶
- file_requirement_service¶
alias de
TaskFileRequirementService
- file_requirements¶
- files¶
- classmethod find_task_status_date(official_number, year)¶
- first_visit¶
- fix_lines_mode()¶
Ensure that Task.mode is consistent with TaskLine.mode
- format_amount(amount, trim=True, grouping=True, precision=2)¶
- frozen_settings¶
- frozen_settings_initialize()¶
Persist business specific labels on the Task object
- gen_business()¶
Generate a business based on this Task
- Renvoie:
A new business instance
- Type renvoyé:
- get_company()¶
Return the company owning this task
- get_company_id()¶
Return the id of the company owning this task
- get_customer()¶
Return the customer of the current task
- classmethod get_customer_task_factory(customer)¶
Renvoie la classe à utiliser pour créer une Task pour le client donné
- get_default_product_id(products=None, default_tva=None)¶
Try to find a default product_id regarding the current context
- get_default_tva(tva_options=None)¶
Return the default tva to be used in this specific context
The last used in the document
or - The default one
- get_expense_ht()¶
Expense HT amount (Not used in newer Tasks)
- get_file_requirements(scoped=False, file_type_id=None)¶
Return the file requirements related to this Task :param bool scoped: If True, return only the file requirements that are directly associated with this Task
- get_file_requirements_status()¶
Return the status of the indicators concerning this Task
- get_groups()¶
- get_main_sequence_number()¶
- get_price_study()¶
- get_progress_invoicing_plan()¶
- get_selectable_products()¶
- get_selectable_tvas()¶
- get_tva_objects()¶
- get_tvas() dict¶
Build a dict grouping TVA amounts by tva values
- Renvoie:
{tva_value: tva_amount} {2000: 2000000, 1000: 1000000}
Tva value is in 10*2 format Tva amount is in 10*5 format
- get_tvas_by_product()¶
Tva amounts grouped by products
- get_type_label()¶
- classmethod get_valid_estimations(*args, **kwargs)¶
- classmethod get_valid_invoices(*args, **kwargs)¶
- classmethod get_waiting_estimations(*args)¶
- classmethod get_waiting_invoices(*args)¶
- groups_total_ht()¶
- groups_total_ttc()¶
- has_line_dates()¶
- has_price_study()¶
- has_progress_invoicing_plan()¶
- ht¶
- id¶
- initialize_business_type_data()¶
Initialize the data related to the Task’s business type
File requirements
Mandatory Mentions
- insurance¶
- insurance_id¶
- internal = False¶
- internal_number¶
- invoice_types = ('invoice', 'cancelinvoice', 'internalinvoice', 'internalcancelinvoice')¶
- is_training()¶
- json_totals(request)¶
Collect totals and returns a json representation of all values
- legacy_number¶
- line_groups¶
- mandatory_mentions¶
- max_lines_date()¶
- mention_service¶
alias de
TaskMentionService
- mentions¶
- min_lines_date()¶
- mode¶
- name¶
- naming_service¶
alias de
NamingService
- no_tva()¶
- notes¶
- official_number¶
- on_before_commit(request, action, changes=None)¶
Handles actions to be run before commiting modifications to the current Task
- owner¶
- owner_id¶
- parent: Any¶
- parent_id¶
- payment_conditions¶
- payments¶
- pdf_file¶
- pdf_file_hash¶
- pdf_file_id¶
- phase¶
- phase_id¶
- post_ttc_lines¶
- post_ttc_total()¶
- prefix = ''¶
- price_study¶
- progress_invoicing_plan¶
- project¶
- project_id¶
- project_index¶
- round_floor¶
- set_auto_validated()¶
Set Task as auto_validated
- set_display_ttc()¶
Set last display_ttc value used by the company :return: number
- set_display_units()¶
Set last display_units value used by the company :return: number
- set_numbers(company_index, project_index)¶
Handle all attributes related to the given number
- set_price_study(request)¶
- set_progress_invoicing_plan(request)¶
- set_status(status, request, **kw)¶
set the status of a task through the state machine
- start_date¶
- status¶
- status_comment¶
- status_date¶
- status_user¶
- status_user_id¶
- statuses¶
- total()¶
Total TTC + expenses (Same as total_ttc in newer Tasks)
- total_due()¶
- total_ht_rate(rate_name: str, ht: Optional[int] = None) int¶
Compute the amount that will be covered by the « rate_name » contribution
- Paramètres:
rate_name (str) – contribution/insurance …
- classmethod total_income(*args, **kwargs)¶
- total_ttc()¶
TTC total without expenses (Same as total in newer Tasks)
- ttc¶
- tva¶
- tva_amount()¶
Sum of TVA amounts
- tva_ht_parts()¶
Build a dict grouping total HT amounts by associated tva
- tva_native_parts()¶
Build a dict grouping total HT or TTC (depending mode) amounts by associated tva
- tva_ttc_parts()¶
Build a dict gropuing total TTC amounts by associated TVA
- type_¶
- unset_price_study(request)¶
- unset_progress_invoicing_plan(request)¶
- update_indicators()¶
Update indicators related to this Task
Complete the indicators that are already satisfied
- updated_at¶
- validation_state_manager = None¶
- validation_status_history¶
- workplace¶
- class endi.models.task.task.TaskLine(**kwargs)¶
Bases :
BaseEstimation/Invoice/CancelInvoice lines
- computer = None¶
- cost¶
- date¶
- description¶
- duplicate()¶
duplicate a line
- classmethod from_price_study_product(product)¶
- classmethod from_price_study_work(work)¶
- classmethod from_price_study_work_item(work_item)¶
- classmethod from_sale_product(sale_product, document=None)¶
Build an instance based on the given sale_product
- Paramètres:
sale_product (obj) – A SaleProduct instance
- Pararm obj document:
The Estimation/Invoice…
- Renvoie:
A TaskLine instance
- classmethod from_sale_product_work_item(work_item, document=None)¶
Build an instance based on the given SaleProductWorkItem
- gen_cancelinvoice_line()¶
Return a cancel invoice line duplicating this one
- get_tva()¶
- group¶
- group_id¶
- id¶
- is_in_hours¶
- mode¶
- month¶
- on_before_commit(request, state, attributes=None)¶
Handle actions before commit
- Paramètres:
(default None)
- order¶
- price_study_product¶
- product¶
- product_id¶
- progress_invoicing_product¶
- quantity¶
- task¶
- total()¶
- total_ht()¶
- tva¶
- tva_amount()¶
- unit_ht()¶
- unit_ttc()¶
- unity¶
- year¶
- class endi.models.task.task.TaskLineGroup(**kwargs)¶
Bases :
BaseGroup of lines
- description¶
- display_details¶
- duplicate()¶
- classmethod from_price_study_product(product)¶
Build an instance based on the given BasePriceStudyProduct
- classmethod from_sale_product_work(product, document=None)¶
Build an instance based on the given SaleProductWork
- Paramètres:
product (obj) – The original SaleProductWork
document (obj) – The Estimatin/Invoice …
- gen_cancelinvoice_group(request)¶
- get_tvas()¶
- get_tvas_by_product()¶
- id¶
- lines¶
- on_before_commit(request, state, attributes=None)¶
Handle actions before commit
- Paramètres:
(default None)
- order¶
- price_study_chapter¶
- progress_invoicing_chapter¶
- task¶
- task_id¶
- title¶
- total_ht()¶
- total_ttc()¶
- tva_amount()¶
- endi.models.task.task.cache_amounts(mapper, connection, target)¶
Set amounts in the cached amount vars to be able to provide advanced search … options in the invoice list page
- endi.models.task.task.cache_parent_amounts(mapper, connection, target)¶
Set amounts in the cached amount vars to be able to provide advanced search … options in the invoice list page
- endi.models.task.task.freeze_settings(mapper, connection, target)¶
endi.models.task.unity module¶
Models for work unit (days, …)
Module contents¶
The task package entry