Remove some relationship fields when creating new Person
This commit is contained in:
parent
5c66eb5f4f
commit
6b7631013d
|
@ -153,12 +153,24 @@ class PeopleView(MasterView):
|
||||||
f.set_readonly('address')
|
f.set_readonly('address')
|
||||||
f.set_label('address', "Mailing Address")
|
f.set_label('address', "Mailing Address")
|
||||||
|
|
||||||
|
# employee
|
||||||
|
if self.creating:
|
||||||
|
f.remove_field('employee')
|
||||||
|
else:
|
||||||
f.set_readonly('employee')
|
f.set_readonly('employee')
|
||||||
f.set_renderer('employee', self.render_employee)
|
f.set_renderer('employee', self.render_employee)
|
||||||
|
|
||||||
|
# customers
|
||||||
|
if self.creating:
|
||||||
|
f.remove_field('customers')
|
||||||
|
else:
|
||||||
f.set_readonly('customers')
|
f.set_readonly('customers')
|
||||||
f.set_renderer('customers', self.render_customers)
|
f.set_renderer('customers', self.render_customers)
|
||||||
|
|
||||||
|
# users
|
||||||
|
if self.creating:
|
||||||
|
f.remove_field('users')
|
||||||
|
else:
|
||||||
f.set_readonly('users')
|
f.set_readonly('users')
|
||||||
f.set_renderer('users', self.render_users)
|
f.set_renderer('users', self.render_users)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue