I can't create a new model in odoo V12 I get this error " . is an unknown command " when I'm trying to use scaffold :
./odoo-bin scaffold your_module_name addons/
please can you help me
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I can't create a new model in odoo V12 I get this error " . is an unknown command " when I'm trying to use scaffold :
./odoo-bin scaffold your_module_name addons/
please can you help me
It works well on v12 as well. Try with python3 instead of ./
python3 odoo-bin scaffold your_module_name
1. Now odoo 10 or later version use odoo-bin insted of odoo.py
On the shell or terminal, change directory to your odoo folder. Maybe it's in /opt/odoo, or maybe it's in /home/odoo :
cd /opt/odoo
2. Create a new module using the odoo.py script:
./odoo.py scaffold my_new_module ./addons/
(where my_new_module is a name of your new module, and ./addons/ is the Odoo addons directory)
3. Edit the ./addons/my_new_module/__openerp__.py file.
nano ./addons/my_new_module/__openerp__.py
4. Change the name field to set a user friendly name of your module (for example "Andrius's New Module"). Change description and fields also. And add your needed modules, such as 'mail', to the to the list of module dependencies depends.
'depends': ['base', 'mail'],
5. Edit models.py
nano ./addons/my_new_module/models.py
6. Add code in your my_new_module/models.py file, for example:
from openerp import models, api
class FooterlessNotification(models.Model)
_inherit = 'mail.notification'
@api.model
def get_signature_footer(self, user_id, res_model=None, res_id=None, context=None, user_signature=True):
return ""
(As an example, this code will extend the 'mail.notification' model and replace its get_signature_footer method with one that returns an empty footer.)
7. Install your module via Odoo settings.
To find it there you may need to use the "Update Module List" option.
If you can't find the option "Update Module List" either, you may need to enable the "Technical Features" checkbox in your current user's settings.
To display Modules, not just the Applications, remove the tag "Applications" from the search box filter, by clicking the small "x" before the tag.
shareimprove this answer
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up
thank you very much now it works for me
Great.
For odoo 8: https://www.youtube.com/watch?v=ZG_H0t9116E