Commit 59b2e028 authored by Romain Courteaud's avatar Romain Courteaud

Allow user to print the invoice.

parent 6c538622
......@@ -4,6 +4,9 @@
<item>Auditor</item>
<item>Author</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='R-SHADOW-PERSON'>
<item>Auditor</item>
</role>
......
......@@ -3,10 +3,13 @@
<role id='G-COMPANY'>
<item>Assignor</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='R-SHADOW-PERSON'>
<item>Auditor</item>
</role>
<role id='admin'>
<role id='zope'>
<item>Owner</item>
</role>
</local_roles>
......
......@@ -3,10 +3,13 @@
<role id='G-COMPANY'>
<item>Assignor</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='R-SHADOW-PERSON'>
<item>Auditor</item>
</role>
<role id='admin'>
<role id='zope'>
<item>Owner</item>
</role>
</local_roles>
......
......@@ -3,10 +3,13 @@
<role id='G-COMPANY'>
<item>Assignor</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='R-SHADOW-PERSON'>
<item>Auditor</item>
</role>
<role id='admin'>
<role id='zope'>
<item>Owner</item>
</role>
</local_roles>
......
......@@ -3,10 +3,13 @@
<role id='G-COMPANY'>
<item>Assignor</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='R-SHADOW-PERSON'>
<item>Auditor</item>
</role>
<role id='admin'>
<role id='zope'>
<item>Owner</item>
</role>
</local_roles>
......
......@@ -3,10 +3,13 @@
<role id='G-COMPANY'>
<item>Assignor</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='R-SHADOW-PERSON'>
<item>Auditor</item>
</role>
<role id='admin'>
<role id='zope'>
<item>Owner</item>
</role>
</local_roles>
......
......@@ -3,10 +3,13 @@
<role id='G-COMPANY'>
<item>Assignor</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='R-SHADOW-PERSON'>
<item>Auditor</item>
</role>
<role id='admin'>
<role id='zope'>
<item>Owner</item>
</role>
</local_roles>
......
......@@ -3,10 +3,13 @@
<role id='G-COMPANY'>
<item>Assignor</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='R-SHADOW-PERSON'>
<item>Auditor</item>
</role>
<role id='admin'>
<role id='zope'>
<item>Owner</item>
</role>
</local_roles>
......
......@@ -3,10 +3,13 @@
<role id='G-COMPANY'>
<item>Assignor</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='R-SHADOW-PERSON'>
<item>Auditor</item>
</role>
<role id='admin'>
<role id='zope'>
<item>Owner</item>
</role>
</local_roles>
......
......@@ -3,10 +3,13 @@
<role id='G-COMPANY'>
<item>Assignor</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='R-SHADOW-PERSON'>
<item>Auditor</item>
</role>
<role id='admin'>
<role id='zope'>
<item>Owner</item>
</role>
</local_roles>
......
......@@ -3,10 +3,13 @@
<role id='G-COMPANY'>
<item>Assignor</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='R-SHADOW-PERSON'>
<item>Auditor</item>
</role>
<role id='admin'>
<role id='zope'>
<item>Owner</item>
</role>
</local_roles>
......
......@@ -3,10 +3,13 @@
<role id='G-COMPANY'>
<item>Assignor</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='R-SHADOW-PERSON'>
<item>Auditor</item>
</role>
<role id='admin'>
<role id='zope'>
<item>Owner</item>
</role>
</local_roles>
......
......@@ -4,6 +4,9 @@
<item>Auditor</item>
<item>Author</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='R-SHADOW-PERSON'>
<item>Auditor</item>
</role>
......
<local_roles_item>
<local_roles>
<role id='R-COMPUTER'>
<role id='G-COMPANY'>
<item>Auditor</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='zope'>
......
<local_roles_item>
<local_roles>
<role id='R-COMPUTER'>
<role id='G-COMPANY'>
<item>Auditor</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='zope'>
......
<local_roles_item>
<local_roles>
<role id='G-COMPANY'>
<item>Auditor</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='zope'>
<item>Owner</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
<local_roles_item>
<local_roles>
<role id='G-COMPANY'>
<item>Auditor</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='zope'>
<item>Owner</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
......@@ -4,6 +4,9 @@
<item>Auditor</item>
<item>Author</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='R-SHADOW-PERSON'>
<item>Auditor</item>
</role>
......
......@@ -3,10 +3,13 @@
<role id='G-COMPANY'>
<item>Assignor</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='R-SHADOW-PERSON'>
<item>Auditor</item>
</role>
<role id='admin'>
<role id='zope'>
<item>Owner</item>
</role>
</local_roles>
......
......@@ -4,6 +4,9 @@
<item>Auditor</item>
<item>Author</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='zope'>
<item>Owner</item>
</role>
......
......@@ -4,6 +4,9 @@
<item>Auditor</item>
<item>Author</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='admin'>
<item>Owner</item>
</role>
......
<local_roles_item>
<local_roles>
<role id='ERP5TypeTestCase'>
<item>Owner</item>
</role>
<role id='G-COMPANY'>
<item>Assignor</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='zope'>
<item>Owner</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
......@@ -3,6 +3,9 @@
<role id='G-COMPANY'>
<item>Assignor</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='zope'>
<item>Owner</item>
</role>
......
<local_roles_item>
<local_roles>
<role id='ERP5TypeTestCase'>
<item>Owner</item>
</role>
<role id='G-COMPANY'>
<item>Assignor</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item>
</role>
<role id='zope'>
<item>Owner</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
......@@ -4,6 +4,11 @@
<multi_property id='category'>group/company</multi_property>
<multi_property id='base_category'>group</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Member</property>
<multi_property id='category'>role/member</multi_property>
<multi_property id='base_category'>role</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Person Shadow</property>
<multi_property id='category'>role/shadow/person</multi_property>
......
......@@ -4,6 +4,11 @@
<multi_property id='category'>group/company</multi_property>
<multi_property id='base_category'>group</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Member</property>
<multi_property id='category'>role/member</multi_property>
<multi_property id='base_category'>role</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Person Shadow</property>
<multi_property id='category'>role/shadow/person</multi_property>
......
......@@ -4,6 +4,11 @@
<multi_property id='category'>group/company</multi_property>
<multi_property id='base_category'>group</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Member</property>
<multi_property id='category'>role/member</multi_property>
<multi_property id='base_category'>role</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Person Shadow</property>
<multi_property id='category'>role/shadow/person</multi_property>
......
<type_roles>
<role id='Auditor'>
<property id='title'>Group company</property>
<multi_property id='category'>group/company</multi_property>
<multi_property id='base_category'>group</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Member</property>
<multi_property id='category'>role/member</multi_property>
<multi_property id='base_category'>role</multi_property>
</role>
</type_roles>
\ No newline at end of file
<type_roles>
<role id='Auditor'>
<property id='title'>Group company</property>
<multi_property id='category'>group/company</multi_property>
<multi_property id='base_category'>group</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Member</property>
<multi_property id='category'>role/member</multi_property>
<multi_property id='base_category'>role</multi_property>
</role>
</type_roles>
\ No newline at end of file
......@@ -4,6 +4,11 @@
<multi_property id='category'>group/company</multi_property>
<multi_property id='base_category'>group</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Member</property>
<multi_property id='category'>role/member</multi_property>
<multi_property id='base_category'>role</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Person Shadow</property>
<multi_property id='category'>role/shadow/person</multi_property>
......
......@@ -4,6 +4,11 @@
<multi_property id='category'>group/company</multi_property>
<multi_property id='base_category'>group</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Member</property>
<multi_property id='category'>role/member</multi_property>
<multi_property id='base_category'>role</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Person Shadow</property>
<multi_property id='category'>role/shadow/person</multi_property>
......
......@@ -4,4 +4,9 @@
<multi_property id='category'>group/company</multi_property>
<multi_property id='base_category'>group</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Member</property>
<multi_property id='category'>role/member</multi_property>
<multi_property id='base_category'>role</multi_property>
</role>
</type_roles>
\ No newline at end of file
......@@ -4,4 +4,9 @@
<multi_property id='category'>group/company</multi_property>
<multi_property id='base_category'>group</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Member</property>
<multi_property id='category'>role/member</multi_property>
<multi_property id='base_category'>role</multi_property>
</role>
</type_roles>
\ No newline at end of file
......@@ -4,4 +4,9 @@
<multi_property id='category'>group/company</multi_property>
<multi_property id='base_category'>group</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Member</property>
<multi_property id='category'>role/member</multi_property>
<multi_property id='base_category'>role</multi_property>
</role>
</type_roles>
\ No newline at end of file
......@@ -4,4 +4,9 @@
<multi_property id='category'>group/company</multi_property>
<multi_property id='base_category'>group</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Member</property>
<multi_property id='category'>role/member</multi_property>
<multi_property id='base_category'>role</multi_property>
</role>
</type_roles>
\ No newline at end of file
......@@ -833,9 +833,10 @@ class TestAccountingTransactionModule(TestSlapOSGroupRoleSecurityMixin):
def test(self):
module = self.portal.accounting_module
self.assertSecurityGroup(module,
['G-COMPANY', 'zope', 'R-SHADOW-PERSON'], True)
['G-COMPANY', 'zope', 'R-SHADOW-PERSON', 'R-MEMBER'], True)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, 'R-SHADOW-PERSON', ['Auditor'])
self.assertRoles(module, 'R-MEMBER', ['Auditor'])
self.assertRoles(module, 'zope', ['Owner'])
class TestAccountingTransaction(TestSlapOSGroupRoleSecurityMixin):
......@@ -925,8 +926,9 @@ class TestServiceModule(TestSlapOSGroupRoleSecurityMixin):
def test(self):
module = self.portal.service_module
self.assertSecurityGroup(module,
['G-COMPANY', 'admin'], True)
['G-COMPANY', 'admin', 'R-MEMBER'], True)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, 'R-MEMBER', ['Auditor'])
self.assertRoles(module, 'admin', ['Owner'])
class TestService(TestSlapOSGroupRoleSecurityMixin):
......@@ -935,17 +937,19 @@ class TestService(TestSlapOSGroupRoleSecurityMixin):
portal_type='Service')
product.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(product,
['G-COMPANY', self.user_id], False)
['G-COMPANY', self.user_id, 'R-MEMBER'], False)
self.assertRoles(product, 'G-COMPANY', ['Assignor'])
self.assertRoles(product, 'R-MEMBER', ['Auditor'])
self.assertRoles(product, self.user_id, ['Owner'])
class TestAccountModule(TestSlapOSGroupRoleSecurityMixin):
def test(self):
module = self.portal.account_module
self.assertSecurityGroup(module,
['G-COMPANY', 'zope', 'R-SHADOW-PERSON'], False)
['G-COMPANY', 'zope', 'R-SHADOW-PERSON', 'R-MEMBER'], False)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, 'R-SHADOW-PERSON', ['Auditor'])
self.assertRoles(module, 'R-MEMBER', ['Auditor'])
self.assertRoles(module, 'zope', ['Owner'])
class TestAccount(TestSlapOSGroupRoleSecurityMixin):
......@@ -954,18 +958,20 @@ class TestAccount(TestSlapOSGroupRoleSecurityMixin):
portal_type='Account')
product.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(product,
['G-COMPANY', self.user_id, 'R-SHADOW-PERSON'], False)
['G-COMPANY', self.user_id, 'R-SHADOW-PERSON', 'R-MEMBER'], False)
self.assertRoles(product, 'G-COMPANY', ['Assignor'])
self.assertRoles(product, 'R-SHADOW-PERSON', ['Auditor'])
self.assertRoles(product, 'R-MEMBER', ['Auditor'])
self.assertRoles(product, self.user_id, ['Owner'])
class TestCurrencyModule(TestSlapOSGroupRoleSecurityMixin):
def test(self):
module = self.portal.currency_module
self.assertSecurityGroup(module,
['G-COMPANY', 'admin', 'R-SHADOW-PERSON'], True)
['G-COMPANY', 'admin', 'R-SHADOW-PERSON', 'R-MEMBER'], True)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, 'R-SHADOW-PERSON', ['Auditor'])
self.assertRoles(module, 'R-MEMBER', ['Auditor'])
self.assertRoles(module, 'admin', ['Owner'])
class TestCurrency(TestSlapOSGroupRoleSecurityMixin):
......@@ -974,17 +980,19 @@ class TestCurrency(TestSlapOSGroupRoleSecurityMixin):
portal_type='Currency')
product.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(product,
['G-COMPANY', self.user_id, 'R-SHADOW-PERSON'], False)
['G-COMPANY', self.user_id, 'R-SHADOW-PERSON', 'R-MEMBER'], False)
self.assertRoles(product, 'G-COMPANY', ['Assignor'])
self.assertRoles(product, 'R-SHADOW-PERSON', ['Auditor'])
self.assertRoles(product, 'R-MEMBER', ['Auditor'])
self.assertRoles(product, self.user_id, ['Owner'])
class TestSaleTradeConditionModule(TestSlapOSGroupRoleSecurityMixin):
def test(self):
module = self.portal.sale_trade_condition_module
self.assertSecurityGroup(module,
['G-COMPANY', 'zope'], False)
['G-COMPANY', 'zope', 'R-MEMBER'], False)
self.assertRoles(module, 'G-COMPANY', ['Auditor', 'Author'])
self.assertRoles(module, 'R-MEMBER', ['Auditor'])
self.assertRoles(module, 'zope', ['Owner'])
class TestSaleTradeCondition(TestSlapOSGroupRoleSecurityMixin):
......@@ -993,8 +1001,9 @@ class TestSaleTradeCondition(TestSlapOSGroupRoleSecurityMixin):
portal_type='Sale Trade Condition')
product.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(product,
['G-COMPANY', self.user_id], False)
['G-COMPANY', self.user_id, 'R-MEMBER'], False)
self.assertRoles(product, 'G-COMPANY', ['Assignor'])
self.assertRoles(product, 'R-MEMBER', ['Auditor'])
self.assertRoles(product, self.user_id, ['Owner'])
class TestAccountingPeriod(TestSlapOSGroupRoleSecurityMixin):
......@@ -1509,3 +1518,23 @@ class TestSecurePaymentTool(TestSlapOSGroupRoleSecurityMixin):
self.assertPermissionsOfRole(tool, 'Reviewer', [])
self.assertAcquiredPermissions(tool, ['Add SlapOS Tools', 'Add Vifib Tools'])
class TestBusinessProcessModule(TestSlapOSGroupRoleSecurityMixin):
def test(self):
module = self.portal.business_process_module
self.assertSecurityGroup(module,
['G-COMPANY', 'zope', 'R-MEMBER'], False)
self.assertRoles(module, 'G-COMPANY', ['Auditor'])
self.assertRoles(module, 'R-MEMBER', ['Auditor'])
self.assertRoles(module, 'zope', ['Owner'])
class TestBusinessProcess(TestSlapOSGroupRoleSecurityMixin):
def test_GroupCompany(self):
product = self.portal.business_process_module.newContent(
portal_type='Business Process')
product.updateLocalRolesOnSecurityGroups()
self.assertSecurityGroup(product,
['G-COMPANY', self.user_id, 'R-MEMBER'], False)
self.assertRoles(product, 'G-COMPANY', ['Auditor'])
self.assertRoles(product, 'R-MEMBER', ['Auditor'])
self.assertRoles(product, self.user_id, ['Owner'])
152
\ No newline at end of file
153
\ No newline at end of file
......@@ -13,6 +13,8 @@ account_module/sales
accounting_module
business_process_module
business_process_module/slapos_aggregated_business_process
business_process_module/slapos_consumption_business_process
business_process_module/slapos_subscription_business_process
campaign_module
component_module
computer_model_module
......
......@@ -13,6 +13,8 @@ account_module/sales
accounting_module
business_process_module
business_process_module/slapos_aggregated_business_process
business_process_module/slapos_consumption_business_process
business_process_module/slapos_subscription_business_process
campaign_module
component_module
computer_model_module
......
......@@ -7,6 +7,8 @@ Acknowledgement
Assignment
Balance Transaction
Bank Account
Business Process
Business Process Module
Campaign
Campaign Module
Cash Register
......
......@@ -7,6 +7,8 @@ Acknowledgement
Assignment
Balance Transaction
Bank Account
Business Process
Business Process Module
Campaign
Campaign Module
Cash Register
......
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