This topic contains 1 reply, has 1 voice, and was last updated by Pavel Levin 8 years, 11 months ago.
-
Topic
-
Hello!
I created custom entity via migrations:12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091public function up(Schema $schema, QueryBag $queries){$table = $this->extendExtension->createCustomEntityTable($schema,'Operation');$this->extendExtension->addManyToOneRelation($schema,$table,'contacts','orocrm_contact','last_name',['extend' => ['owner' => ExtendScope::OWNER_CUSTOM]]);$table->addColumn('number','integer',['notnull' => true,'oro_options' => ['datagrid' => ['is_visible' => true],'extend' => ['owner' => ExtendScope::OWNER_CUSTOM],]]);$this->extendExtension->addOptionSet($schema,$table,'status',['extend' => ['owner' => ExtendScope::OWNER_CUSTOM],]);$this->extendExtension->addOptionSet($schema,$table,'type',['extend' => ['owner' => ExtendScope::OWNER_CUSTOM],]);$table->addColumn('sum','float',['notnull' => true,'oro_options' => ['datagrid' => ['is_visible' => true],'extend' => ['owner' => ExtendScope::OWNER_CUSTOM],]]);$table->addColumn('date_create','datetime',['notnull' => true,'oro_options' => ['extend' => ['owner' => ExtendScope::OWNER_CUSTOM],]]);$table->addColumn('date_execute','datetime',['notnull' => false,'oro_options' => ['extend' => ['owner' => ExtendScope::OWNER_CUSTOM],]]);$table->addColumn('reason','string',['notnull' => false,'oro_options' => ['datagrid' => ['is_visible' => true],'extend' => ['owner' => ExtendScope::OWNER_CUSTOM],]]);}Enity form is displayed well, but entity detail view throw error:
Catchable fatal error: Object of class DateTime could not be converted to string in /home/plevin/www40/orocrm/app/cache/dev/twig/8b/72/96db2417b4dac71a9037af96e11cc71231ed4cf8ba45b9b0f90a3bd300a4.php on line 490
Columns width in list view are incorrect:
Please, tell me, how i can fix it?
The forum ‘OroCRM – Programming Questions’ is closed to new topics and replies.