- 29 Jan, 2024 40 commits
-
-
Romain Courteaud authored
* add slapos_virtual_master_subscription local roles * only sort some properties * Sale agent can access currencies * restore Subscription Request local roles * Sale agent can create Subscription Request
-
Romain Courteaud authored
-
Romain Courteaud authored
* Subscription Request is a ticket like Credential Request * restore subscription_request_workflow as ticket_workflow * Subscription Request is not linked to a project * add Subscription Request Constraint * new constraint on Subscription Request * add testSlapOSERP5VirtualMasterSubscriptionRequestScenario * drop outdated subscription scenarios * WIP selling project subscription * forbid Subscription Request which could generate Invoice with a 0 price * do not allow empty quantity on Subscription Request * WIP selling virtual master to customer * improve test Trade Condition * disable existing Subscription Request alarm * create Subscription Request from orphaned Instance Tree * create Open Sale Order from Subscription Request * drop slapos_subscription_request_process_planned * drop slapos_subscription_request_process_draft * drop slapos_subscription_request_process_ordered * drop slapos_subscription_request_process_confirmed * drop slapos_subscription_request_process_started * drop slapos_subscription_request_process_stopped * drop Alarm_processStoppedSubscriptionRequest * test slapos_subscription_request_create_from_orphaned_item * add assert when creating Open Order * alarm to validate submitted Subscription Request * create Subscription Requuest manually from a resource * create Subscription Request for Compute Node * trigger validation as soon as a Subscription Request is submitted * decrease slapos_subscription_request_validate_submitted alarm periodicity * create Subscription Request as soon as a Compute Node is validated * create Subscription Request as soon as Instance Tree is validated * use different trade condition for instance and node * do not generate Subscription for Organisation This work must be done later * constraint: no Organisation as source_section * constraint: fixup empty price check * constraint: destination_section is not required for accounting less subscription * stop creating project from subscription request It is too complex (as it requires to create Trade Condition, Assignment, Project, etc...), and I don't know for now how to make something generic from it. Use a custom action for now.
-
Romain Courteaud authored
* Sale person can access Service * only provide read/write access on Organisation to Sale/Accountant * Sale aent create Trade Condition
-
Romain Courteaud authored
-
Romain Courteaud authored
It creates unresolvable dependency
-
Romain Courteaud authored
-
Romain Courteaud authored
This reverts commit 42c90b1f.
-
Romain Courteaud authored
* improve consistency in the Role Definition * improve Role Definition consistency * XXX do not allow users to create Compute Node / Instance Tree Break everything, to investigate how we could integrate Open Order with Compute Node
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
* testSlapOSERP5VirtualMasterScenario: define bank account * testSlapOSERP5VirtualMasterScenario: Payment Transaction is not built anymore * TestSlapOSVirtualMasterScenarioMixin * wip testSlapOSERP5VirtualMasterInvoicingScenario
-
Romain Courteaud authored
-
Romain Courteaud authored
* test: drop unused functions * test: create a bank account source payment on the trade condition
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
* disable monitor only if allocation_scope is closed/forever
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
* testSlapOSERP5InteractionWorkflow: there is no source administrator on Compute Node * drop Base_useSaleTradeConditionReference
-
Romain Courteaud authored
-
Romain Courteaud authored
it is only used in one place. Let's create it manually
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
* drop all trade condition * drop business processes
-
Romain Courteaud authored
* drop the aggregated packing list logic Some parts are still there, but linked to subscription, which I will check later * testSlapOSAccountingBuilder Recreate the expected organisation. Drop the aggregated builder test * revert aggregated builder test removal * drop consumption/reservation/subscription business process * drop all trade conditions * force using ledger=automated Disable all simulation logic if the automated ledger is not used * builder test: set ledger and destination_project Use a test trade condition * drop Base_testSlapOSValidTradeCondition * update testSlapOSAccountingRule * drop compatibility with expliciate trade condition usage * add Project_getAccountingCurrency * ensore project has a currency before generating an open order * do not explode the workflow history with the same comment * testSlapOSAccountingRule stop using hardcoded trade condition * do not expand packing list if no invoice is supposed to be generated (aka, no need for slapos_consumption_trade_condition) * testSlapOSAccountingBuilder stop using deleted business processes * testSlapOSAccountingAlarm: only ledger/automated movement are built * testSlapOSAccountingBuilder: stop using deleted business processes * testSlapOSAccountingAlarm: update test * drop usage of createZODBPythonScript * testSlapOSAccountingInteractionWorkflow: a project is required on the Instance Tree * stop hardcoding expected trade condition * testSlapOSAccountingSkins update to latest changes * testSlapOSEntityCreatePayment: stop using invoice template * drop Base_useSaleTradeConditionReference * drop usage of createZODBScript * call OpenSaleOrder_reindexIfIndexedBeforeLine on an Open Order, instead of the Alarm * testSlapOSAccountingRule: factorise Sale Supply creation * test InstanceTree_requestUpdateOpenSaleOrder * do not invalidate open order, as it breaks the simulation * keep slapos_legacy_aggregated_subscription_trade_condition_2022 when uninstalling it * do not duplicate arguments * set Ban Account from the trade condition source payment * constraint to check if invoice has a source payment defined * stop checking specialise == getPreferredAggregatedSaleTradeCondition. Check ledger instead * build source/destination decision/payment * no causality on invoice * do not invalidate open order * test: define source payment on the open order * builders: do not merge movement with different prices * builder: set aggregate on cell, not line * builder: group movement by specialise Previously, we has 1 invoice per simulation tree. But we want to reduce the number of invoice, without using the "aggregate" builder trick * SimulationMovement_buildSlapOS search by specialise * test that dedicated trade condition / supply are applied * invoice builder: group movement's date on the delivery level * invoice builder: dates are now set on delivery. Do not modify causality if it exists * testSlapOSAccountingBuilder: update quantity unit of software product * testSlapOSAccountingBuilder: typo * do not hardcode payzen payment mode * get payment mode from the trade condition's payment condition * invoice payment mode is fetched from trade condition * payzen payment mode is not set anymore on invoice * source project is not required on Payment Transaction Customer can buy Virtual MAster * do not filter by destination_project__uid=None It leads to always return nothing, as it does a join to the category table * the virtual master subscription Service has a time/month quantity unit * Open Order, Packing List, Hosting Subscription may not be linked to a Project * do not aply trade condition if source/destination projects are different from order * do not require Project on Sale Invoice Transaction * do not require a Project on Sale Supply * disable open order creation * stop creation Open Sale Order from Instance Tree * deprecate Alarm_requestUpdateInstanceTreeOpenSaleOrder * trigger alarm as soon as Item are marked as subscribed * export service_module/slapos_compute_node_subscription * contraint: source_section is not required on Open Sale Order Needed for accounting less Open Order. * constraint: source_section is not required on Sale Packing List * constraint: no Organisation as destination / destination_section * export month quantity unit convertion To drop warning in logs * drop InstanceTree_requestUpdateOpenSaleOrder * rules: stop diverging on source/destination payment Those info are not supposed to be set on order/delivery (ie, there is no field for this) * drop duplicated config * set the source payment before finalising the sale invoice * ensure the same currency is used on Order and Trade Condition * force all Sale documents to use a consistent price currency * add script to generate the deposit * add deposit account XXX configuration must be reviewed * add Deposit service to use on the invoice * deposit service is not taxable XXX to check with accountants * business process: no need to have 2 credit path * creation causality link between the deposit payment and invoice * put destination account in the transaction line XXX no way currently to support having no destination if the destination_section does not handle accounting * add alarm slapos_update_delivery_simulation Generate invoice from packing list * generate accounting for resource_use/use/trade/deposit * add slapos_simulation_interaction_workflow Speed up execution of the simulation process by triggering alarms as soon as it is needed * generate Open Order simulation as soon as it is simulated * do not stop invoice until the stop date is passed * stop setting the source_payment on the Invoice It is too early, and prevent other Simulation Movement to be aggregated * set source_payment just before closing the invoice * checkConsistency after the source_payment is set * serialise on business link to try grouping all user invoices movements * destination project is not required on invoice Do not search with a None value * Extend the invoice causality with the parent simulation movement explanation * drop not needed movement group Previous movement group already force the same invoice * use the discount_service on the discount service No idea if it is a good idea or not for now * generate accounting movement for discount service * also compare invoice price with discount sale packing list * no need to update open order period anymore * drop unused script * drop unused slapos_request_update_instance_tree_open_sale_order * drop unused SubscriptionRequest_*etAggregatedConsumptionDelivery * drop not needed slapos_start_confirmed_aggregated_subscription_sale_packing_list * drop slapos_api_invoicing_workflow * add an alarm to close the open order * no need to reindex open sale order * expand the open order one last time, to no miss any period * use Base_reindexAndSenseAlarm * drop jump_related_grouped_sale_packing_list * drop slapos_contract_request_validation_payment alarm * drop unused script * drop Project_getAccountingCurrency * test: slapos_request_update_instance_tree_open_sale_order was dropped * test: drop outdated tests * test: update titles * test: InstanceTree_requestUpdateOpenSaleOrder was dropped * test: drop tests related to dropped scripts * test: use valid trade condition to generate the simulation * only run alarm once per day Interaction workflow are now supposed to trigger the alarm when needed * run alarm once per day * require trade_condition_type on Sale Trade Condition * search Sale Trade Condition by trade_condition_type * set trade_condition_type on temporary Sale Order * ensure trade_condition_type matches * disable packing list generation from tioxml Everything is broken currently... * drop testSlapOSContractAlarm * drop create_new_cloud_contract action * drop jump_to_cloud_contract action * test: SoftwareInstance_requestValidationPayment was dropped * drop CloudContractLine_getRemainingInvoiceCredit * drop Person_isAllowedToAllocate * drop Entity_statSlapOSOutstandingAmount * test: change class inheritance do not inherit from a class with existing test, as it forces subclass to keep exactly the same test function name * lint: do not redefine id variable * fix: do not use unrelated causality value Builder passes all movement used to generate all the invoice * allow closing the invoice has soon as the stop date value is reached * test: wip accounting checks * do not access the object if not needed * drop Entity_statOutstandingAmount * wip Entity_hasOutstandingAmount * wip: create from multiple invoices using Entity_getOutstandingAmountList * group also outstanding amount by ledger * drop PaymentTransaction_start * use the same ledger than the payment transaction * create Payment Transaction to pay all user's invoices * improve Payment line title * allow to pay invoices at a date * test paying invoices * test: fix create payment tests * drop preferred_default_pre_payment_subscription_invoice_template_property * test: templates were dropped * drop preferred_default_pre_payment_template * drop getPreferredAggregatedSubscriptionSaleTradeCondition * drop preferred_aggregated_sale_trade_condition * test: unused variable * test: fixup testSlapOSAccountingConstraint * test: fix trade condition retrieval * drop preferred_instance_delivery_template_property * drop slapos_accounting_instance_delivery_template * drop slapos_accounting_instance_delivery_line_template * drop preferred_aggregated_consumption_sale_trade_condition * drop SlapOSAccountingSystemPreference * keep organisation_module/slapos/bank_account * disable packing list generation from tio xml this is not critical for now, and will be upgraded later * fixConsistency is not called anymore on Hosting Subscription * drop template_compute_node * drop template_member * test: there is no causality_state anymore on instance tree * test: fix consistency on Hosting Subscription does not set the periodicity date * drop unused script * reduce number of sale trade condition to check
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
Only for lazy me to simplify grep usage
-
Romain Courteaud authored
Everything should work without it. It will be rework later.
-
Romain Courteaud authored
-
Romain Courteaud authored
-