Improvements to invoice display and other misc items
This commit is contained in:
@@ -42,7 +42,10 @@ class Model_Module extends ORM_OSB {
|
||||
* @param $id PK of Model
|
||||
*/
|
||||
public function instance($id=NULL) {
|
||||
return ORM::factory(ucwords($this->name),$id);
|
||||
if (! $this->loaded())
|
||||
throw new Kohana_Exception('Cant call an instance of a model when it is not loaded');
|
||||
|
||||
return ORM::factory(Kohana::classname($this->name),$id);
|
||||
}
|
||||
|
||||
public function list_external() {
|
||||
|
Reference in New Issue
Block a user