Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: CI
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff
# Update output format to enable automatic inline annotations.
- name: Run Ruff
run: ruff check --output-format=github .
1 change: 1 addition & 0 deletions addons/custom-addons/custom_partner/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
11 changes: 11 additions & 0 deletions addons/custom-addons/custom_partner/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
'name': 'Custom Partner',
'summary': 'Extending Res Partner',
'version': '1.0',
'author': 'Reinaldo J. Menendez',
'category': 'Contacts',
'depends': ['base'],
'data': [],
'auto_install': False,
'installable': True,
}
1 change: 1 addition & 0 deletions addons/custom-addons/custom_partner/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import res_partner
21 changes: 21 additions & 0 deletions addons/custom-addons/custom_partner/models/res_partner.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from odoo import models, fields, _, Command, api
import logging
import json

class ResPartner(models.Model):
_inherit ='res.partner'

custom_field=fields.Char(string='Custom Field')
custom_compute = fields.Char(compute='_compute_custom_field')

@api.depends('custom_field')
def _compute_custom_field(self):
for record in self:
# this is a very long line to test the line length. Just adding random text here to see if I go far beyond the line length :)
record.custom_compute=record.custom_field



def actionConfirmContactName(self):
a = 3+6
return True
1 change: 1 addition & 0 deletions addons/custom-addons/custom_sale/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
11 changes: 11 additions & 0 deletions addons/custom-addons/custom_sale/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
'name': 'Custom Sale',
'summary': 'Extending Sale Order',
'version': '1.0',
'author': 'Reinaldo J. Menendez',
'category': 'Sales',
'depends': ['sale'],
'data': [],
'auto_install': False,
'installable': True,
}
1 change: 1 addition & 0 deletions addons/custom-addons/custom_sale/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import sale_order
14 changes: 14 additions & 0 deletions addons/custom-addons/custom_sale/models/sale_order.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from odoo import models, fields, _, Command
import logging
import json

class SaleOrder(models.Model):
_inherit ='sale.order'

custom_date=fields.Date()

def action_set_date(self):
self.custom_date=fields.Date.today()
return True


Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
11 changes: 11 additions & 0 deletions addons/external-addons/external_addon_with_issues/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
'name': 'External Addon with Linter Issues',
'summary': 'This is an example of external addon with linter issues',
'version': '1.0',
'author': 'Reinaldo J. Menendez',
'category': 'Extra Tools',
'depends': ['base'],
'data': [],
'auto_install': False,
'installable': True,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import my_model
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from odoo import models, fields, _, Command
import logging
import json

class MyModel(models.Model):
_name ='my.model'

name=fields.Char(string='Name' )