Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add odoo-training modules #3

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
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
41 changes: 41 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
language: python
sudo: false
cache:
apt: true
directories:
- $HOME/.cache/pip

python:
- "3.5"

addons:
postgresql: "9.6"
apt:
packages:
- expect-dev # provides unbuffer utility
- python-lxml # because pip installation is slow
- python-simplejson
- python-serial
- python-yaml
env:
global:
- VERSION="12.0" TESTS="0" LINT_CHECK="0" TRANSIFEX="0"
- TRANSIFEX_USER='[email protected]'

matrix:
- LINT_CHECK="1"
- TRANSIFEX="1"
- TESTS="1" ODOO_REPO="OCA/OCB"
- TESTS="1" ODOO_REPO="odoo/odoo"


install:
- git clone --depth=1 https://github.com/Eficent/maintainer-quality-tools.git ${HOME}/maintainer-quality-tools
- export PATH=${HOME}/maintainer-quality-tools/travis:${PATH}
- travis_install_nightly

script:
- travis_run_tests

after_success:
- travis_after_tests_success
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
My Odoo Custom Addons
Empty file added __init__.py
Empty file.
4 changes: 4 additions & 0 deletions certification_alert/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from . import models



18 changes: 18 additions & 0 deletions certification_alert/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2019 Eficent
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
'name': 'Certification Alert',
'summary': "Warning when you purchase a product without a certificate.",
'author': "Eficent, Odoo Community Association (OCA)",
'website': "https://github.com/<my_github_user>",
'category': 'Certification Management',
'version': '12.0.1.0.0',
'license': 'AGPL-3',
'depends': ['base', 'purchase', 'certification_v2', 'product'],
'data': ['security/ir.model.access.csv',
'views/product_template_views.xml'
],
'development_status': 'Beta',
'maintainers': ['ceeficent'],
}
4 changes: 4 additions & 0 deletions certification_alert/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from . import product_template



Binary file not shown.
Binary file not shown.
8 changes: 8 additions & 0 deletions certification_alert/models/product_template.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

from odoo import models,fields,api


class ProductTemplate(models.Model):
_inherit = 'product.template'

certification_ids = fields.Many2many('certification.standard')
8 changes: 8 additions & 0 deletions certification_alert/models/purchase.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

from odoo import models,fields,api
from odoo.exceptions import ValidationError


class PurchaseOrder(models.Model):
_inherit = "purchase.order"

5 changes: 5 additions & 0 deletions certification_alert/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_certification_alert_user,certification_alert.employee,model_product_template,base.group_user,1,1,1,1



14 changes: 14 additions & 0 deletions certification_alert/views/product_template_views.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="product_template_form_view" model="ir.ui.view">
<field name="name">Product certification</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view"/>
<field name="arch" type="xml">
<xpath expr="//page[@name='purchase']" position="inside">
<group string="Certifications Required" />
<field name="certification_ids" />
</xpath>
</field>
</record>
</odoo>
5 changes: 5 additions & 0 deletions certification_v2/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from . import models
from . import wizard
from . import reports


27 changes: 27 additions & 0 deletions certification_v2/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright 2019 Eficent
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
'name': 'Certification V2',
'summary': "Defines certifaction for different purposes.",
'author': "Eficent, Odoo Community Association (OCA)",
'website': "https://github.com/<my_github_user>",
'category': 'Certification Management',
'version': '12.0.1.0.0',
'license': 'AGPL-3',
'depends': ['base'],
'data': ['security/ir.model.access.csv',
'views/certification_view.xml',
'views/res_partner_view.xml',
'views/standard_view.xml',
'security/certification_security.xml',
'reports/certification_report_pdf.xml',
'reports/certification_template_pdf.xml',
'reports/certification_report.xml'
],
'demo':
['demo/certification_data.xml',
],
'development_status': 'Beta',
'maintainers': ['ceeficent'],
}
Loading