Commit 6b711038 authored by Łukasz Nowak's avatar Łukasz Nowak

Switch to Sale Invoice.

This documents allow to lower balance of customer, Payment Transaction shall
not be used.
parent 581f825c
master 20240521_variousimprovements 20240704 20240827 20240905_fixup 20240913 20240914 20240925 20240930 20241004 20241008 20241021 20241106 20241107 20241114 20241127 20241209 20241230 20250108 20250117_beforesquash_newapi 20250121 alain-message allocation_consistency_instance_node amarisoft cache change_subscription_price cleanup cliff-cleanup crm_fix customprice cygwin-link-local event_attachment feat/cmmi_cache feat/openorderbasedsecurity feat/statuscleanup feat/testcase feature/cgroups feature/format-crumbled feature/manager-cpuset feature/option_create_tun feature/tun-cgroup-cleanup fix/slapos-ansible format_loop hosting_daily_invoice hotfix/proxy-root-instance localwip lxc manager_update_parameter master-dev message-box new-api-master-client panel_computer_guid panel_filter_action_dict payzen-fixup py3_fixup regulatisation_request_for_organisation seb slap_tool_less_sql_query slapjs slapos-override-env slapproxy-connection-parameter splitopenorder subscription_change_request tomo_fix_slapos_format tomo_fix_slapos_node_boot tomo_listbox_update trigger_allocation_alarm upgrade_decision_event urlJS usage_report wip wip20210701 wip20210819 wip20220131 1.4.27 1.4.26 1.4.25 1.4.24 1.4.23 1.4.22 1.4.21 1.4.20 1.4.19 1.4.17 1.4.16 1.4.15 1.4.14 1.4.12 1.4.11 1.4.10 1.4.9 1.4.8 1.4.7 1.4.6 1.4.5 1.4.4 1.4.3 1.4.2 1.4.1 1.4.0 1.3.18 1.3.17 1.3.16 1.3.15 1.3.14 1.3.13 1.3.12 1.3.11 1.3.10 1.3.9 1.3.8 1.3.7 1.3.6.3 1.3.6.2 1.3.6.1 1.3.6 1.3.5 1.3.4 1.3.3 1.3.2 1.3.1 1.3.0 1.2.4.1 1.2.4 1.2.3.1 1.2.3 1.2.2 1.2.1 1.2.0 1.1.3 1.1.2 1.1.1 1.1.0 1.0.5 1.0.4 1.0.3 1.0.2 1.0.1 1.0.0 1.0.0rc6 1.0.0rc5 1.0.0rc4 1.0.0rc3 1.0.0-rc1 0.35.1 0.34 0.33.1 0.33 0.32.3 0.32.2 0.32 0.31.2 0.31.1 0.31 0.30 0.29 0.28.9 0.28.8 0.28.7 0.28.6 0.28.5 0.28.4 0.28.3 0.28.2 0.28.1 0.28 0.27 0.26.2 0.26.1 0.26 0.25 0.24 0.23 0.22 master-20180917 jquerymobile.noanimation
No related merge requests found
...@@ -204,31 +204,60 @@ class TestVifibSlapComputerPartitionLock(TestVifibSlapWebServiceMixin): ...@@ -204,31 +204,60 @@ class TestVifibSlapComputerPartitionLock(TestVifibSlapWebServiceMixin):
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self)
def stepCreateSmallPayment(self, sequence, **kw): def stepCreateSmallInvoiceWebUser(self, sequence, **kw):
person = self.portal.ERP5Site_getAuthenticatedMemberPersonValue(sequence[ person = self.portal.ERP5Site_getAuthenticatedMemberPersonValue(sequence[
'web_user']) 'web_user'])
payment_transaction = self.portal.accounting_module.newContent( invoice = self.portal.accounting_module.newContent(
source_section='organisation_module/vifib_internet', portal_type='Sale Invoice Transaction',
destination_section=person.getRelativeUrl(), start_date=DateTime(),
resource='currency_module/EUR', resource='currency_module/EUR',
portal_type="Payment Transaction", source_section='organisation_module/vifib_internet',
start_date=DateTime(), source='organisation_module/vifib_internet',
# XXX More info needed destination_section=person.getRelativeUrl(),
) destination=person.getRelativeUrl(),
payment_transaction.newContent( specialise='sale_trade_condition_module/vifib_trade_condition'
portal_type="Accounting Transaction Line", )
quantity=1, invoice.newContent(
source='account_module/receivable', portal_type='Invoice Line',
) resource=self.portal.portal_preferences.getPreferredRegistrationResource(),
payment_transaction.newContent( quantity=1,
portal_type="Accounting Transaction Line", price=1
quantity=-1, )
source='account_module/sales', sequence['invoice'] = invoice
)
payment_transaction.confirm() def stepPlanInvoice(self, sequence, **kw):
payment_transaction.start() sequence['invoice'].plan()
# XXX More info needed
payment_transaction.checkConsistency() def stepConfirmInvoice(self, sequence, **kw):
sequence['invoice'].confirm()
def stepStartInvoice(self, sequence, **kw):
sequence['invoice'].start()
def stepCheckWebUserBalanceSmallAmount(self, sequence, **kw):
person = self.portal.ERP5Site_getAuthenticatedMemberPersonValue(sequence[
'web_user'])
self.assertEqual(-1.0,
self.portal.portal_simulation.getInventoryAssetPrice(
node_category='account_type/asset/receivable',
simulation_state=['started', 'stopped', 'delivered'],
section_uid=self.portal.restrictedTraverse(
'organisation_module/vifib_internet').getUid(),
mirror_section_uid=person.getUid())
)
create_small_registration_fee_invoice = """
LoginERP5TypeTestCase
CreateSmallInvoiceWebUser
Tic
PlanInvoice
Tic
ConfirmInvoice
StartInvoice
Tic
CheckWebUserBalanceSmallAmount
Logout
"""
def test_automated_person_small_not_paid_not_locking(self): def test_automated_person_small_not_paid_not_locking(self):
"""Test that a person is not automatically locked by an alarm if """Test that a person is not automatically locked by an alarm if
...@@ -245,12 +274,7 @@ class TestVifibSlapComputerPartitionLock(TestVifibSlapWebServiceMixin): ...@@ -245,12 +274,7 @@ class TestVifibSlapComputerPartitionLock(TestVifibSlapWebServiceMixin):
CheckPersonUnlockedState \ CheckPersonUnlockedState \
Tic \ Tic \
Logout \ Logout \
\ ' + self.create_small_registration_fee_invoice + '\
LoginERP5TypeTestCase \
CreateSmallPayment \
Tic \
Logout \
\
TriggerLockPersonAlarm \ TriggerLockPersonAlarm \
Tic \ Tic \
Logout \ Logout \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment