Example #1
0
File: adminx.py Project: mgrai/mmcp
 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
Example #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
Example #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
Example #4
0
File: adminx.py Project: mgrai/mmcp
 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