Commit 41df934f authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_accounting: VAT and Country are only mandatory for automated ledger

parent e47387c5
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
</item> </item>
<item> <item>
<key> <string>test_tales_expression</string> </key> <key> <string>test_tales_expression</string> </key>
<value> <string>python: context.hasSourceSection() and context.hasDestinationSection()</string> </value> <value> <string>python: context.getLedger() == \'automated\' and context.hasSourceSection() and context.hasDestinationSection()</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
</item> </item>
<item> <item>
<key> <string>test_tales_expression</string> </key> <key> <string>test_tales_expression</string> </key>
<value> <string>python: context.hasDestinationSection(portal_type=\'Organisation\')</string> </value> <value> <string>python: context.getLedger() == \'automated\' and context.hasDestinationSection(portal_type=\'Organisation\')</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -48,8 +48,6 @@ class TestSlapOSManualAccountingScenario(TestSlapOSVirtualMasterScenarioMixin): ...@@ -48,8 +48,6 @@ class TestSlapOSManualAccountingScenario(TestSlapOSVirtualMasterScenarioMixin):
# required to generate accounting report # required to generate accounting report
price_currency_value=currency, price_currency_value=currency,
# required to calculate the vat # required to calculate the vat
group='company',
vat_code='MYVATCODE',
default_address_region='europe/west/france' default_address_region='europe/west/france'
) )
bank_account = accountant_organisation.newContent( bank_account = accountant_organisation.newContent(
...@@ -351,11 +349,7 @@ class TestSlapOSManualAccountingScenario(TestSlapOSVirtualMasterScenarioMixin): ...@@ -351,11 +349,7 @@ class TestSlapOSManualAccountingScenario(TestSlapOSVirtualMasterScenarioMixin):
# Accountaint can create a hosting provider # Accountaint can create a hosting provider
customer = self.portal.organisation_module.newContent( customer = self.portal.organisation_module.newContent(
portal_type='Organisation', portal_type='Organisation',
title='Customer Org. for %s' % accountant_person.getTitle(), title='Customer Org. for %s' % accountant_person.getTitle()
# Required for issue an Sale Invoice Transaction
vat_code='MYVATCODE',
default_address_region='europe/west/france'
) )
else: else:
customer = self.portal.person_module.newContent( customer = self.portal.person_module.newContent(
......
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