I’m running a local development instance in docker and I wonder how to enable/install the eggs module.
Is there a direct button/menu from somewhere to the quickforms (I reached it directly on the url /farm/eggs instead). There I can see checkboxes for other modules (milk, planting, move animals etc) but not for eggs.
I also checked the installed modules in the configurations but
How to enable it?
Also I’m thinking about customizing the eggs module, as the european/german regulation needs us to count classes and sizes of eggs, ex:
Class A:
Size S:
…
Size XL:
Class B:
Class C:
Whats the best way to develop a module locally, and then what entails on making it into a deployment?
I git cloned git@github.com:farmOS/farm_eggs.git
into www/sites/all/modules/custom
then went into the admin/modules and enabled:
Farm Eggs
Farm Asset Property
Now I’ll look in ways how to change the module.
Any documentation/tutorials on drupal modules you might recommend?
What is the workflow for updating the module and deployit into the local instance?
drusc cc all and install the module again, for example? or is there a more expedited way?
Basically, it’s a docker-compose.yml file which bind mounts and installs the module on startup. This allows for a fully automated and disposable development environment where live editing of the module is mostly possible - though some cases will require a cache clear or disable/enable cycle where DB changes are involved on installation.
as the whole /var/www/html dir was mapped in my docker-compose.yml, I cloned the farm_eggs module in sites/all/modules/custom subdir and seems to work.
Sometimes takes a while for the changes to take effect, i think regardless of running a “docker run drush cc all” (is this the right way to clear the cache?)
I cloned the farm_eggs module in sites/all/modules/custom subdir and seems to work.
That’s a good place for it.
Sometimes takes a while for the changes to take effect, i think regardless of running a “docker run drush cc all” (is this the right way to clear the cache?)
Yep! That will clear the cache!
There are some other considerations you may be running into though…
drush cc menu will rebuild the {menu_router} database table - which does not happen on drush cc itself. This is only necessary if changes are being made to hook_menu() implementations, though, so that’s probably not what you’re running into.
The other “gotcha” is that PHP’s opcode cache is enabled by default in the Docker image, which means changes to files might not get picked up immediately (I think it defaults to watching for changes every 60 seconds). We fixed this in the 2.x branch but haven’t backported it to 1.x.
(docker run will start a new container, whereas docker exec is for executing a command inside a running container. Maybe that’s what you meant… but figured I’d clarify.)
I’m trying to figure out how to relate each egg collection to an area where currently the asset (bird group) is, or manually selecting it. Is it somehow possible to implement this with the eggs quickform?
As I see in the code, farm_quantity_log_create and farm_quick_entity_link don’t implement any area reference.
I’m trying to figure out how to relate each egg collection to an area where currently the asset (bird group) is
In the submit function (farm_eggs_form_submit()), right after the log is created (via farm_quantity_log_create()) you could add some additional code that adds more info to the $log object, and then call log_save($log) to save those changes.
Hello raleonardo and others who posted here,
I am into poultry farm business, looking to utilise a software to manage the farm. I am researching to know if farmOS is a good fit for the farm. The thread attracted me as Ricardo seems to do something like a im looking for. Will this farrmOs fit for poultry farm business? Ricardo can i contact you? this is my email: basstone40@gmail.com
Thank you all, and i am sorry for the noise i may have made!