Exemple #1
0
 def setup_slaves(self):
     BasePersonRoleEditor.setup_slaves(self)
     self.details_slave = TransporterDataSlave(self.store,
                                               self.model,
                                               visual_mode=self.visual_mode)
     slave = self.main_slave.get_person_slave()
     slave.attach_slave('person_status_holder', self.details_slave)
Exemple #2
0
    def setup_slaves(self):
        BasePersonRoleEditor.setup_slaves(self)
        if not self.individual_slave:
            raise ValueError('This editor must have an individual slave')
        self.details_slave = EmployeeDetailsSlave(self.store, self.model,
                                                  visual_mode=self.visual_mode)
        custom_tab_label = _('Employee Data')
        slave = self.individual_slave
        slave._person_slave.add_extra_tab(custom_tab_label, self.details_slave)
        self.status_slave = EmployeeStatusSlave(self.store, self.model,
                                                visual_mode=self.visual_mode)
        slave.attach_person_slave(self.status_slave)
        self.role_slave = EmployeeRoleSlave(self.store, self.model,
                                            edit_mode=self.edit_mode,
                                            visual_mode=self.visual_mode)
        db_form = self._person_slave.db_form
        slave._person_slave.attach_role_slave(self.role_slave)

        if db_form:
            db_form.update_widget(self.role_slave.role,
                                  other=self.role_slave.role_lbl)
            db_form.update_widget(self.role_slave.salary,
                                  other=self.role_slave.salary_lbl)

        history_tab_label = _("Role History")
        history_slave = EmployeeRoleHistorySlave(self.model)
        slave._person_slave.add_extra_tab(history_tab_label, history_slave)
    def setup_slaves(self):
        from .opticalslave import MedicDetailsSlave
        BasePersonRoleEditor.setup_slaves(self)

        tab_text = _('Medic Details')
        self.medic_details_slave = MedicDetailsSlave(
            self.store, self.model, visual_mode=self.visual_mode)
        self.main_slave._person_slave.add_extra_tab(tab_text,
                                                    self.medic_details_slave)
Exemple #4
0
    def setup_slaves(self):
        BasePersonRoleEditor.setup_slaves(self)
        self.status_slave = ClientStatusSlave(self.store, self.model,
                                              visual_mode=self.visual_mode)
        self.main_slave.attach_person_slave(self.status_slave)

        credit_slave = ClientCreditSlave(self.store, self.model,
                                         visual_mode=self.visual_mode,
                                         edit_mode=self.edit_mode)
        self.main_slave._person_slave.add_extra_tab(_('Credit Details'),
                                                    credit_slave)
Exemple #5
0
    def setup_slaves(self):
        BasePersonRoleEditor.setup_slaves(self)

        user_status = UserStatusSlave(self.store, self.model,
                                      visual_mode=self.visual_mode)
        self.main_slave.attach_person_slave(user_status)

        passwd_fields = not self.edit_mode
        self.user_details = UserDetailsSlave(self.store, self.model,
                                             show_password_fields=passwd_fields,
                                             visual_mode=self.visual_mode)
        tab_text = _('User Details')
        self.main_slave._person_slave.add_extra_tab(tab_text, self.user_details,
                                                    self.USER_TAB_POSITION)

        tab_text = _('Branch Access')
        self.user_branches = UserBranchAccessSlave(self.store, self.model)
        self.main_slave._person_slave.add_extra_tab(tab_text, self.user_branches)
Exemple #6
0
 def setup_slaves(self):
     BasePersonRoleEditor.setup_slaves(self)
     self.status_slave = BranchDetailsSlave(self.store, self.model,
                                            visual_mode=self.visual_mode)
     self.main_slave.attach_person_slave(self.status_slave)