This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
->add('kind','doctrine_orm_choice',array('label' => 'Kind'),'choice', | |
array('choices' => array(), 'expanded' => true) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
->add('date_from', 'doctrine_orm_datetime_range',array('label'=>'Desde','input_type' => 'string', | |
'input' => 'string','format' => 'dd/MM//yyyy' ), | |
'sonata_type_filter_datetime ', array( | |
'widget' => 'single_text', | |
'required' => false, | |
'attr' => array('class' => 'sonata-datepicker'), | |
'format' => 'dd/MM/yyyy', | |
) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* http://www.rjguevara.com/2013/02/symfony-2-ignorar-campos-vacios-en.html | |
*/ | |
namespace Acme\TestBundle\Form\Listener; | |
use Symfony\Component\Form\FormEvent; | |
use Symfony\Component\Form\FormEvents; | |
use Symfony\Component\Form\FormFactoryInterface; | |
use Symfony\Component\EventDispatcher\EventSubscriberInterface; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<field name="pet_ids" widget="many2many" domain="[('partner_id','=',partner_id)]" mode="tree" | |
context="{'tree_view_ref' : 'module_name.view_custom_tree_info'}"> | |
<tree> | |
<field name="name"/> | |
<field name="breed"/> | |
<field name="gender"/> | |
</tree> | |
</field> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To log sql statements in openerp you append --log-level=debug_sql in command line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Edit next systemd service files. | |
On | |
/usr/lib64/systemd/system/rpc-mountd.service | |
edit ExecStart | |
ExecStart=/usr/sbin/rpc.mountd -F -p 32767 | |
On | |
/usr/lib64/systemd/system/rpc-statd.service | |
edit ExecStart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib.sites.models import Site as SiteOld | |
class Site(SiteOld): | |
"""Site only have a one Costumer/Shop.""" | |
costumer = models.OneToOneField('Costumer', verbose_name='customer') | |
def __init__(self, *args, **kwargs): | |
""" | |
Overrided __init__. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Enviroment variables | |
MOZ_OMTC_ENABLED="1" | |
MOZ_USE_OMTC="1" | |
Firefox settings | |
webgl.force-enabled=true | |
webgl.msaa-force=true | |
layers.acceleration.force-enabled=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Edit /etc/mysql/my.cnf | |
Change | |
#bind-address = 127.0.0.1 | |
For | |
bind-address = 0.0.0.0 | |
Log into mysql | |
mysql -u root -p |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -name "*.pyc" -exec rm '{}' ';' |
OlderNewer