Пример #1
0
    def do_site_startup(self):
        super(Site, self).do_site_startup()

        from lino.modlib.changes.models import watch_changes as wc

        wc(self.modules.tickets.Ticket)
        wc(self.modules.comments.Comment, master_key="owner")
        if self.is_installed("extjs"):
            self.plugins.extjs.autorefresh_seconds = 0
Пример #2
0
def my_change_watchers(sender,**kw):
    """
    This site watches the changes to Partner, Person, Company and Note
    """
    self = sender
    
    from lino.modlib.changes.models import watch_changes as wc
    
    """
    In our example we want to collect changes to Company and Entry 
    objects to their respective Partner.
    """
    wc(self.modules.contacts.Partner)
    wc(self.modules.contacts.Company,master_key='partner_ptr')
    wc(self.modules.workflows_tutorial.Entry,master_key='company__partner_ptr')
                
    """
    add two application-specific panels, one to Partners, one to Companies:
    """
    self.modules.contacts.Partners.add_detail_tab('changes','changes.ChangesByMaster')
    self.modules.contacts.Companies.add_detail_tab('entries','workflows_tutorial.EntriesByCompany')
Пример #3
0
def my_change_watchers(sender, **kw):
    """
    This site watches the changes to Partner, Company and Entry
    """
    self = sender

    from lino.modlib.changes.models import watch_changes as wc

    # In our example we want to collect changes to Company and Entry
    # objects to their respective Partner.

    wc(self.modules.contacts.Partner)
    wc(self.modules.contacts.Company, master_key='partner_ptr')
    wc(self.modules.watch_tutorial.Entry, master_key='company__partner_ptr')

    # add two application-specific panels, one to Partners, one to
    # Companies:
    self.modules.contacts.Partners.add_detail_tab('changes',
                                                  'changes.ChangesByMaster')
    self.modules.contacts.Companies.add_detail_tab(
        'entries', 'watch_tutorial.EntriesByCompany')
Пример #4
0
    def do_site_startup(self):
        super(Site, self).do_site_startup()

        from lino.modlib.changes.models import watch_changes as wc

        wc(self.modules.contacts.Partner)
        wc(self.modules.contacts.Person, master_key='partner_ptr')
        wc(self.modules.contacts.Company, master_key='partner_ptr')
        wc(self.modules.pcsw.Client, master_key='partner_ptr')

        wc(self.modules.pcsw.Coaching, master_key='client__partner_ptr')
        wc(self.modules.pcsw.ClientContact, master_key='client__partner_ptr')
        wc(self.modules.jobs.Candidature, master_key='person__partner_ptr')

        # ContractBase is abstract, so it's not under self.modules
        from lino_welfare.modlib.isip.models import ContractBase
        wc(ContractBase, master_key='client__partner_ptr')

        from lino_welfare.modlib.cbss.mixins import CBSSRequest
        wc(CBSSRequest, master_key='person__partner_ptr')
Пример #5
0
    def do_site_startup(self):
        
        super(Site, self).do_site_startup()

        from lino.modlib.changes.models import watch_changes as wc

        wc(self.modules.contacts.Partner)
        wc(self.modules.contacts.Person, master_key='partner_ptr')
        wc(self.modules.contacts.Company, master_key='partner_ptr')
        wc(self.modules.pcsw.Client, master_key='partner_ptr')

        wc(self.modules.pcsw.Coaching, master_key='client__partner_ptr')
        wc(self.modules.pcsw.ClientContact, master_key='client__partner_ptr')