Beispiel #1
0
 def formfield_for_dbfield(self, db_field, **kwargs):
     if db_field.name == 'company':
         kwargs['queryset'] = getAllCompany(self)
         
     if db_field.name == 'vendor':
         kwargs['queryset'] = getAllVendor(self)
         
     if db_field.name == 'user':
         kwargs['queryset'] = getAllUsers(self, PURCHASE_GROUP)
     
     field = super(InvoiceAdmin, self).formfield_for_dbfield(db_field, **kwargs)
     return field
Beispiel #2
0
    def formfield_for_dbfield(self, db_field, **kwargs):
        if db_field.name == 'company':
            kwargs['queryset'] = getAllCompany(self)

        if db_field.name == 'vendor':
            kwargs['queryset'] = getAllVendor(self)

        if db_field.name == 'user':
            kwargs['queryset'] = getAllUsers(self, PURCHASE_GROUP)

        field = super(InvoiceAdmin,
                      self).formfield_for_dbfield(db_field, **kwargs)
        return field
Beispiel #3
0
 def formfield_for_dbfield(self, db_field, **kwargs):
     if db_field.name == 'vendor':
         kwargs['queryset'] = getAllVendor(self)
     field = super(VendorSettingAdmin,
                   self).formfield_for_dbfield(db_field, **kwargs)
     return field
Beispiel #4
0
 def formfield_for_dbfield(self, db_field, **kwargs):
     if db_field.name == 'vendor':
         kwargs['queryset'] = getAllVendor(self)
     field = super(VendorSettingAdmin, self).formfield_for_dbfield(db_field, **kwargs)
     return field