Trịnh Anh Ngọc
Trịnh Anh Ngọc
We need a bundled dictionary for common words used in Odoo such as: odoo, pricelist, fname. With this bundle, we will avoid many typo errors in code. PyCharm already bundled...
https://github.com/odoo/odoo/blob/15.0/odoo/__init__.py In Odoo, the current thread can contains the `dbname` attribute. We should suspend such errors.
https://github.com/odoo/odoo/blob/15.0/odoo/__init__.py Since `odoo` is a package, it contains the `__path__` attribute by default.
https://github.com/odoo/odoo/blob/15.0/odoo/__init__.py For custom modules, PyCharm also needs to check requirements.txt from both custom modules and the Odoo source code.
```python _depends = {} """dependencies of models backed up by SQL views ``{model_name: field_names}``, where ``field_names`` is an iterable. This is only used to determine the changes to flush to...
It would be nice to have a QWeb debugger in PyCharm, like the Django debugger in PyCharm (https://www.jetbrains.com/help/pycharm/debugging-django-template-tutorial.html). Not sure if it's possible with QWeb, though.
For example, the following code can lead to a singleton error: ```python @api.depends('product_uom_qty', 'discount', 'price_unit', 'tax_id') def _compute_amount(self): """ Compute the amounts of the SO line. """ for line in...
Example: ```python @tools.ormcache('frozenset(self.env.user.groups_id.ids)', 'model_name', 'debug') def _get_bindings(self, model_name, debug=False): """ Retrieve the list of actions bound to the given model. :return: a dict mapping binding types to a list of...
The Odoo plugin currently supports code completion for tag and attribute name in form view. We also need this feature for QWeb view.
Being able to determine type of variable is important in providing accurate code completion and navigation. But sometimes it's difficult to determine type of variable. For example, in QWeb template,...