├── license.txt ├── recod_erpnext_design ├── patches.txt ├── docs │ ├── assets │ │ ├── .gitkeep │ │ ├── recod_website_theme_dark.jpg │ │ ├── recod_website_theme_light.jpg │ │ ├── recod_print_format_quotation.png │ │ ├── recod_print_format_salary_slip.png │ │ ├── recod_print_format_sales_order.png │ │ ├── terms_and_conditions_on_receipt.png │ │ ├── recod_print_format_delivery_note.png │ │ ├── recod_print_format_purchase_order.png │ │ ├── recod_print_format_sales_invoice.png │ │ ├── terms_and_conditions_on_delivery.png │ │ ├── terms_and_conditions_on_due_date.png │ │ ├── recod_print_format_purchase_invoice.png │ │ ├── recod_print_format_request_for_quotation.png │ │ └── terms_and_conditions_20-30-50-by-bank-transfer.png │ ├── index.md │ └── user │ │ └── index.md ├── templates │ ├── __init__.py │ └── pages │ │ └── __init__.py ├── modules.txt ├── recod_erpnext_design │ ├── __init__.py │ ├── tests │ │ └── __init__.py │ └── doctype │ │ └── __init__.py ├── translations │ ├── fr.csv │ └── ru.csv ├── __init__.py ├── config │ ├── __init__.py │ ├── recod_erpnext_design.py │ ├── desktop.py │ └── docs.py ├── tests │ ├── __init__.py │ ├── test_config_desktop.py │ ├── test_hooks.py │ └── test_config_docs.py ├── hooks.py └── fixtures │ ├── website_theme.json │ └── terms_and_conditions.json ├── requirements.txt ├── docs ├── _config.yml └── README.md ├── .codacy.yml ├── .travis ├── .dockerignore ├── .env ├── Dockerfile.test ├── Dockerfile.alpine ├── Dockerfile.debian ├── Dockerfile.debian-slim ├── docker-nginx.conf ├── docker_test.sh ├── docker-compose.postgres.yml └── docker-compose.mariadb.yml ├── .gitmoji-changelogrc ├── .deepsource.toml ├── .gitattributes ├── hooks └── build ├── Dockerfile.test ├── MANIFEST.in ├── .env ├── .github ├── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md ├── stale.yml ├── PULL_REQUEST_TEMPLATE.md └── config.yml ├── package.json ├── setup.py ├── Dockerfile ├── CONTRIBUTING.md ├── .eslintrc ├── .gitignore ├── CHANGELOG.md ├── .dockerignore ├── CODE_OF_CONDUCT.md ├── manage.sh ├── README.md ├── .travis.yml ├── docker-compose.yml └── LICENSE /license.txt: -------------------------------------------------------------------------------- 1 | License: AGPL v3 -------------------------------------------------------------------------------- /recod_erpnext_design/patches.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | frappe 2 | erpnext -------------------------------------------------------------------------------- /docs/_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /recod_erpnext_design/docs/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /recod_erpnext_design/templates/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.codacy.yml: -------------------------------------------------------------------------------- 1 | exclude_paths: 2 | - '**.sql' 3 | -------------------------------------------------------------------------------- /recod_erpnext_design/templates/pages/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /recod_erpnext_design/modules.txt: -------------------------------------------------------------------------------- 1 | Recod ERPNext Design -------------------------------------------------------------------------------- /.travis/.dockerignore: -------------------------------------------------------------------------------- 1 | # Ignore files during docker build 2 | docker-compose*.yml 3 | .env 4 | Dockerfile* 5 | .travis.yml 6 | -------------------------------------------------------------------------------- /recod_erpnext_design/recod_erpnext_design/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | -------------------------------------------------------------------------------- /recod_erpnext_design/translations/fr.csv: -------------------------------------------------------------------------------- 1 | apps/recod_erpnext_design/config/desktop.py,Recod ERPNext Design,Recod ERPNext Design -------------------------------------------------------------------------------- /recod_erpnext_design/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | __version__ = '1.2.0' 5 | -------------------------------------------------------------------------------- /recod_erpnext_design/config/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """Recod ERPNext Design app configuration.""" 3 | 4 | from __future__ import unicode_literals 5 | -------------------------------------------------------------------------------- /recod_erpnext_design/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Recod ERPNext Design app tests. 4 | """ 5 | 6 | from __future__ import unicode_literals 7 | -------------------------------------------------------------------------------- /recod_erpnext_design/recod_erpnext_design/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | """Recod ERPNext Design module tests.""" 4 | -------------------------------------------------------------------------------- /recod_erpnext_design/recod_erpnext_design/doctype/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | """Recod ERPNext Design module Doctypes.""" 4 | -------------------------------------------------------------------------------- /recod_erpnext_design/docs/assets/recod_website_theme_dark.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monogramm/recod_erpnext_design/HEAD/recod_erpnext_design/docs/assets/recod_website_theme_dark.jpg -------------------------------------------------------------------------------- /recod_erpnext_design/docs/assets/recod_website_theme_light.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monogramm/recod_erpnext_design/HEAD/recod_erpnext_design/docs/assets/recod_website_theme_light.jpg -------------------------------------------------------------------------------- /recod_erpnext_design/docs/assets/recod_print_format_quotation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monogramm/recod_erpnext_design/HEAD/recod_erpnext_design/docs/assets/recod_print_format_quotation.png -------------------------------------------------------------------------------- /recod_erpnext_design/docs/assets/recod_print_format_salary_slip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monogramm/recod_erpnext_design/HEAD/recod_erpnext_design/docs/assets/recod_print_format_salary_slip.png -------------------------------------------------------------------------------- /recod_erpnext_design/docs/assets/recod_print_format_sales_order.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monogramm/recod_erpnext_design/HEAD/recod_erpnext_design/docs/assets/recod_print_format_sales_order.png -------------------------------------------------------------------------------- /recod_erpnext_design/docs/assets/terms_and_conditions_on_receipt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monogramm/recod_erpnext_design/HEAD/recod_erpnext_design/docs/assets/terms_and_conditions_on_receipt.png -------------------------------------------------------------------------------- /recod_erpnext_design/docs/assets/recod_print_format_delivery_note.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monogramm/recod_erpnext_design/HEAD/recod_erpnext_design/docs/assets/recod_print_format_delivery_note.png -------------------------------------------------------------------------------- /recod_erpnext_design/docs/assets/recod_print_format_purchase_order.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monogramm/recod_erpnext_design/HEAD/recod_erpnext_design/docs/assets/recod_print_format_purchase_order.png -------------------------------------------------------------------------------- /recod_erpnext_design/docs/assets/recod_print_format_sales_invoice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monogramm/recod_erpnext_design/HEAD/recod_erpnext_design/docs/assets/recod_print_format_sales_invoice.png -------------------------------------------------------------------------------- /recod_erpnext_design/docs/assets/terms_and_conditions_on_delivery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monogramm/recod_erpnext_design/HEAD/recod_erpnext_design/docs/assets/terms_and_conditions_on_delivery.png -------------------------------------------------------------------------------- /recod_erpnext_design/docs/assets/terms_and_conditions_on_due_date.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monogramm/recod_erpnext_design/HEAD/recod_erpnext_design/docs/assets/terms_and_conditions_on_due_date.png -------------------------------------------------------------------------------- /recod_erpnext_design/docs/assets/recod_print_format_purchase_invoice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monogramm/recod_erpnext_design/HEAD/recod_erpnext_design/docs/assets/recod_print_format_purchase_invoice.png -------------------------------------------------------------------------------- /recod_erpnext_design/docs/assets/recod_print_format_request_for_quotation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monogramm/recod_erpnext_design/HEAD/recod_erpnext_design/docs/assets/recod_print_format_request_for_quotation.png -------------------------------------------------------------------------------- /recod_erpnext_design/docs/assets/terms_and_conditions_20-30-50-by-bank-transfer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monogramm/recod_erpnext_design/HEAD/recod_erpnext_design/docs/assets/terms_and_conditions_20-30-50-by-bank-transfer.png -------------------------------------------------------------------------------- /recod_erpnext_design/translations/ru.csv: -------------------------------------------------------------------------------- 1 | apps/recod_erpnext_design/config/desktop.py,Recod ERPNext Design,Recod ERPNext Design 2 | apps/recod_erpnext_design/fixtures/terms_and_conditions.json,Recod ERPNext Design,Recod ERPNext Design -------------------------------------------------------------------------------- /.gitmoji-changelogrc: -------------------------------------------------------------------------------- 1 | { 2 | "project": { 3 | "name": "recod_erpnext_design", 4 | "description": "ERPNext application to provide new sample print formats and overall design for ERPNext.", 5 | "version": "1.2.0" 6 | } 7 | } -------------------------------------------------------------------------------- /.deepsource.toml: -------------------------------------------------------------------------------- 1 | version = 1 2 | 3 | test_patterns = [ 4 | "**/test_*.py" 5 | ] 6 | 7 | exclude_patterns = [ 8 | "recod_erpnext_design/patches/**", 9 | "*.min.js" 10 | ] 11 | 12 | [[analyzers]] 13 | name = "python" 14 | enabled = true 15 | 16 | [analyzers.meta] 17 | runtime_version = "3.x.x" -------------------------------------------------------------------------------- /recod_erpnext_design/config/recod_erpnext_design.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2021, Monogramm and Contributors 3 | # See license.txt 4 | """Configuration for desktop.""" 5 | 6 | from __future__ import unicode_literals 7 | 8 | from frappe import _ 9 | 10 | 11 | def get_data(): 12 | """Returns the module desktop links configuration.""" 13 | return [ 14 | ] 15 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Autodetect text files 2 | * text=auto 3 | 4 | # ...Unless the name matches the following 5 | # overriding patterns 6 | 7 | # Definitively text files 8 | *.txt text 9 | *.svg text 10 | *.md text 11 | *.py text 12 | *.js text 13 | *.sh text eol=lf 14 | *.yml text eol=lf 15 | Dockerfile text eol=lf 16 | 17 | # Ensure those won't be messed up with 18 | *.jpg binary 19 | *.jpeg binary 20 | *.png binary 21 | *.data binary 22 | -------------------------------------------------------------------------------- /recod_erpnext_design/tests/test_config_desktop.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2021, Monogramm and Contributors 3 | # See license.txt 4 | 5 | from __future__ import unicode_literals 6 | 7 | import unittest 8 | 9 | from recod_erpnext_design.config.desktop import get_data 10 | 11 | 12 | class TestDesktop(unittest.TestCase): 13 | def test_get_data(self): 14 | data = get_data() 15 | self.assertIsNotNone(data) 16 | -------------------------------------------------------------------------------- /.travis/.env: -------------------------------------------------------------------------------- 1 | 2 | ######################################## 3 | # ERPNext configuration 4 | ######################################## 5 | 6 | ERPNEXT_SITE=localhost 7 | 8 | ERPNEXT_ADMIN_PWD=erpnext_admin_password 9 | 10 | # Generated with openssl rand -base64 32 11 | ERPNEXT_ENCRYPTION_KEY=dcNdIKUHX/Vgl1sEc0eJIChyYx+2dQ/uASjWXs9hnic= 12 | 13 | ERPNEXT_DB_ROOT_LOGIN=root 14 | ERPNEXT_DB_ROOT_PWD=erpnext_db_root_password 15 | 16 | # DB name will be used as the DB user 17 | ERPNEXT_DB_NAME=erpnext 18 | ERPNEXT_DB_PWD=erpnext_password 19 | 20 | -------------------------------------------------------------------------------- /hooks/build: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # See documentation for details: 4 | # https://docs.docker.com/docker-hub/builds/advanced/ 5 | 6 | docker build \ 7 | --build-arg TAG="${DOCKER_TAG}" \ 8 | --build-arg VCS_REF=`git rev-parse --short HEAD` \ 9 | --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ 10 | --build-arg BUILD_BRANCH="${SOURCE_BRANCH}" \ 11 | --build-arg BUILD_URL="https://github.com/Monogramm/recod_erpnext_design" \ 12 | --build-arg BUILD_APP=recod_erpnext_design \ 13 | -f "${DOCKERFILE_PATH}" \ 14 | -t "${IMAGE_NAME}" . 15 | -------------------------------------------------------------------------------- /recod_erpnext_design/docs/index.md: -------------------------------------------------------------------------------- 1 | # **Recod ERPNext Design** Documentation site 2 | 3 | **Recod ERPNext Design** is an ERPNext application to provide new sample print formats and overall (re)design for Frappe / ERPNext. 4 | 5 | ## Contributing 6 | 7 | For information about contributing, see the [Contributing page](https://github.com/Monogramm/recod_erpnext_design/blob/master/CONTRIBUTING.md). 8 | 9 | ## License 10 | 11 | Copyright © 2020 [Monogramm](https://github.com/Monogramm).
12 | This project is [AGPL v3](https://opensource.org/licenses/AGPL-3.0) licensed. 13 | -------------------------------------------------------------------------------- /.travis/Dockerfile.test: -------------------------------------------------------------------------------- 1 | FROM %%IMAGE_NAME%% 2 | 3 | ADD docker_test.sh /docker_test.sh 4 | 5 | RUN set -ex; \ 6 | sudo chmod 755 /docker_test.sh; \ 7 | sudo pip install coverage==4.5.4; \ 8 | sudo pip install python-coveralls 9 | 10 | EXPOSE 4444 11 | 12 | # Default Chrome configuration 13 | ENV DISPLAY=:20.0 \ 14 | SCREEN_GEOMETRY="1440x900x24" \ 15 | CHROMEDRIVER_PORT=4444 \ 16 | CHROMEDRIVER_WHITELISTED_IPS="127.0.0.1" \ 17 | CHROMEDRIVER_URL_BASE='' \ 18 | CHROMEDRIVER_EXTRA_ARGS='' 19 | 20 | # Test environment variables 21 | ENV TEST_VERSION=${TEST_VERSION} 22 | 23 | CMD ["/docker_test.sh"] 24 | -------------------------------------------------------------------------------- /recod_erpnext_design/config/desktop.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2021, Monogramm and Contributors 3 | # See license.txt 4 | """Configuration for desktop.""" 5 | 6 | from __future__ import unicode_literals 7 | 8 | from frappe import _ 9 | 10 | 11 | def get_data(): 12 | """Returns the application desktop icons configuration.""" 13 | return [ 14 | { 15 | "module_name": "Recod ERPNext Design", 16 | "color": "grey", 17 | "icon": "octicon octicon-paintcan", 18 | "type": "module", 19 | "label": _("Recod ERPNext Design") 20 | } 21 | ] 22 | -------------------------------------------------------------------------------- /Dockerfile.test: -------------------------------------------------------------------------------- 1 | FROM docker-erpnext:recod_erpnext_design-dev 2 | 3 | ADD .travis/docker_test.sh /docker_test.sh 4 | 5 | RUN set -ex; \ 6 | sudo chmod 755 /docker_test.sh; \ 7 | sudo pip install coverage==4.5.4; \ 8 | sudo pip install python-coveralls 9 | 10 | EXPOSE 4444 11 | 12 | # Default Chrome configuration 13 | ENV DISPLAY=:20.0 \ 14 | SCREEN_GEOMETRY="1440x900x24" \ 15 | CHROMEDRIVER_PORT=4444 \ 16 | CHROMEDRIVER_WHITELISTED_IPS="127.0.0.1" \ 17 | CHROMEDRIVER_URL_BASE='' \ 18 | CHROMEDRIVER_EXTRA_ARGS='' 19 | 20 | # Test environment variables 21 | ENV TEST_VERSION=11 22 | 23 | CMD ["/docker_test.sh"] 24 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include MANIFEST.in 2 | include requirements.txt 3 | include *.json 4 | include *.md 5 | include *.py 6 | include *.txt 7 | recursive-include recod_erpnext_design *.css 8 | recursive-include recod_erpnext_design *.csv 9 | recursive-include recod_erpnext_design *.html 10 | recursive-include recod_erpnext_design *.ico 11 | recursive-include recod_erpnext_design *.js 12 | recursive-include recod_erpnext_design *.json 13 | recursive-include recod_erpnext_design *.md 14 | recursive-include recod_erpnext_design *.png 15 | recursive-include recod_erpnext_design *.py 16 | recursive-include recod_erpnext_design *.svg 17 | recursive-include recod_erpnext_design *.txt 18 | recursive-exclude recod_erpnext_design *.pyc -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | 2 | ######################################## 3 | # ERPNext configuration 4 | ######################################## 5 | 6 | ERPNEXT_HOME=/srv/recod_erpnext_design/frappe 7 | 8 | ERPNEXT_SITE=localhost 9 | 10 | ERPNEXT_ADMIN_PWD=erpnext_admin_password 11 | 12 | # Generated with openssl rand -base64 32 13 | ERPNEXT_ENCRYPTION_KEY=dcNdIKUHX/Vgl1sEc0eJIChyYx+2dQ/uASjWXs9hnic= 14 | 15 | ERPNEXT_DB_ROOT_LOGIN=root 16 | ERPNEXT_DB_ROOT_PWD=erpnext_db_root_password 17 | 18 | # DB name will be used as the DB user 19 | ERPNEXT_DB_NAME=erpnext 20 | ERPNEXT_DB_PWD=erpnext_password 21 | 22 | # Local development configuration 23 | IMAGE_NAME=docker-erpnext:recod_erpnext_design-dev 24 | FRAPPE_APP_TO_TEST=recod_erpnext_design 25 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | name: Feature request 4 | about: Suggest an idea for this project 5 | title: '' 6 | labels: enhancement 7 | assignees: 8 | 9 | --- 10 | 11 | **Is your feature request related to a problem? Please describe.** 12 | A clear and concise description of what the problem is. Ex. I'm always frustrated when (...) 13 | 14 | **Describe the solution you'd like** 15 | A clear and concise description of what you want to happen. 16 | 17 | **Describe alternatives you've considered** 18 | A clear and concise description of any alternative solutions or features you've considered. 19 | 20 | **Additional context** 21 | Add any other context or screenshots about the feature request here. 22 | -------------------------------------------------------------------------------- /recod_erpnext_design/tests/test_hooks.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2021, Monogramm and Contributors 3 | # See license.txt 4 | 5 | from __future__ import unicode_literals 6 | 7 | import unittest 8 | 9 | from recod_erpnext_design.hooks import app_title, app_publisher, app_name, app_description, app_icon, app_color, app_email, \ 10 | app_license 11 | 12 | 13 | class TestDesktop(unittest.TestCase): 14 | def test_hooks(self): 15 | self.assertIsNotNone(app_name) 16 | self.assertIsNotNone(app_title) 17 | self.assertIsNotNone(app_publisher) 18 | self.assertIsNotNone(app_description) 19 | self.assertIsNotNone(app_icon) 20 | self.assertIsNotNone(app_color) 21 | self.assertIsNotNone(app_email) 22 | self.assertIsNotNone(app_license) 23 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Configuration for probot-stale - https://github.com/probot/stale 2 | 3 | # Number of days of inactivity before an issue becomes stale 4 | daysUntilStale: 60 5 | # Number of days of inactivity before a stale issue is closed 6 | daysUntilClose: 30 7 | 8 | # Issues with these labels will never be considered stale 9 | exemptLabels: 10 | - pinned 11 | - security 12 | 13 | # Label to use when marking an issue as stale 14 | staleLabel: wontfix 15 | 16 | # Comment to post when marking an issue as stale. Set to `false` to disable 17 | markComment: > 18 | This issue has been automatically marked as stale because it has not had 19 | recent activity. It will be closed if no further activity occurs. Thank you 20 | for your contributions. 21 | 22 | # Comment to post when closing a stale issue. Set to `false` to disable 23 | closeComment: false 24 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "recod_erpnext_design", 3 | "description": "ERPNext application to provide new sample print formats and overall design for ERPNext.", 4 | "author": "Monogramm", 5 | "license": "AGPL", 6 | "dependencies": { 7 | "cypress": "^3.1.4", 8 | "gitmoji-changelog": "^2.1.0", 9 | "lodash": "^4.17.21", 10 | "mem": "^6.1.0", 11 | "minimist": "^1.2.5", 12 | "npm-registry-fetch": "^8.1.3", 13 | "remark-cli": "^7.0.1", 14 | "remark-lint": "^6.0.5", 15 | "remark-lint-list-item-indent": "^1.0.4", 16 | "remark-preset-lint-recommended": "^3.0.3" 17 | }, 18 | "scripts": { 19 | "lint-md": "remark .", 20 | "gitmoji-changelog": "gitmoji-changelog --preset generic && remark CHANGELOG.md -o" 21 | }, 22 | "remarkConfig": { 23 | "plugins": [ 24 | "remark-preset-lint-recommended", 25 | "lint-list-item-indent" 26 | ] 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /recod_erpnext_design/config/docs.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2021, Monogramm and Contributors 3 | # See license.txt 4 | """Configuration for docs.""" 5 | 6 | from __future__ import unicode_literals 7 | 8 | 9 | source_link = "https://github.com/Monogramm/recod_erpnext_design" 10 | docs_base_url = "https://monogramm.github.io/recod_erpnext_design" 11 | headline = "ERPNext application to provide new sample print formats and overall design for ERPNext." 12 | sub_heading = "Use Recod print formats, website themes, etc..." 13 | 14 | 15 | def get_context(context): 16 | """Returns the application documentation context. 17 | 18 | :param context: application documentation context""" 19 | context.brand_html = "Recod ERPNext Design" 20 | context.source_link = source_link 21 | context.docs_base_url = docs_base_url 22 | context.headline = headline 23 | context.sub_heading = sub_heading 24 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from setuptools import setup, find_packages 3 | import re 4 | import ast 5 | 6 | with open('requirements.txt') as f: 7 | install_requires = f.read().strip().split('\n') 8 | 9 | # get version from __version__ variable in recod_erpnext_design/__init__.py 10 | _version_re = re.compile(r'__version__\s+=\s+(.*)') 11 | 12 | with open('recod_erpnext_design/__init__.py', 'rb') as f: 13 | version = str(ast.literal_eval(_version_re.search( 14 | f.read().decode('utf-8')).group(1))) 15 | 16 | setup( 17 | name='recod_erpnext_design', 18 | version=version, 19 | description='ERPNext application to provide new sample print formats and overall design for ERPNext.', 20 | author='Monogramm', 21 | author_email='opensource@monogramm.io', 22 | packages=find_packages(), 23 | zip_safe=False, 24 | include_package_data=True, 25 | install_requires=install_requires 26 | ) 27 | -------------------------------------------------------------------------------- /.travis/Dockerfile.alpine: -------------------------------------------------------------------------------- 1 | FROM monogramm/docker-erpnext:%%VERSION%%-alpine 2 | 3 | RUN set -ex; \ 4 | sudo apk add --update \ 5 | chromium \ 6 | chromium-chromedriver \ 7 | ; 8 | 9 | # Build environment variables 10 | ENV DOCKER_TAG=travis \ 11 | DOCKER_VCS_REF=${TRAVIS_COMMIT} \ 12 | DOCKER_BUILD_DATE=${TRAVIS_BUILD_NUMBER} \ 13 | LANG=C.UTF-8 \ 14 | LC_ALL=C 15 | 16 | 17 | ARG BUILD_BRANCH 18 | ARG BUILD_URL 19 | ARG BUILD_APP 20 | 21 | RUN set -ex; \ 22 | sudo apk add --update \ 23 | #add here your system packages 24 | ; \ 25 | sudo mkdir -p "/home/$FRAPPE_USER"/frappe-bench/logs; \ 26 | sudo touch "/home/$FRAPPE_USER"/frappe-bench/logs/bench.log; \ 27 | sudo chmod 777 \ 28 | "/home/$FRAPPE_USER"/frappe-bench/logs \ 29 | "/home/$FRAPPE_USER"/frappe-bench/logs/* \ 30 | ; \ 31 | bench get-app --branch "${BUILD_BRANCH}" "${BUILD_APP}" "${BUILD_URL}" 32 | 33 | VOLUME "/home/${FRAPPE_USER}/frappe-bench/apps/${BUILD_APP}/public" 34 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | name: Bug report 4 | about: Create a report to help us improve 5 | title: '' 6 | labels: bug 7 | assignees: 8 | 9 | --- 10 | 11 | **Describe the bug** 12 | A clear and concise description of what the bug is. 13 | 14 | **To Reproduce** 15 | Steps to reproduce the behavior: 16 | 1. Go to '...' 17 | 2. Click on '....' 18 | 3. Scroll down to '....' 19 | 4. See error 20 | 21 | **Expected behavior** 22 | A clear and concise description of what you expected to happen. 23 | 24 | **Screenshots** 25 | If applicable, add screenshots to help explain your problem. 26 | 27 | **Desktop (please complete the following information):** 28 | 29 | - OS: (e.g. iOS) 30 | - Browser (e.g. chrome, safari) 31 | - Version (e.g. 22) 32 | 33 | **Smartphone (please complete the following information):** 34 | 35 | - Device: (e.g. iPhone6) 36 | - OS: (e.g. iOS8.1) 37 | - Browser (e.g. stock browser, safari) 38 | - Version (e.g. 22) 39 | 40 | **Additional context** 41 | Add any other context about the problem here. 42 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 18 | 19 | > Please provide enough information so that others can review your pull request: 20 | 21 | 22 | 23 | > Explain the **details** for making this change. What existing problem does the pull request solve? 24 | 25 | 26 | 27 | > Screenshots/GIFs 28 | 29 | 30 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # **Recod ERPNext Design** Documentation site 2 | 3 | **Recod ERPNext Design** is an ERPNext application to provide new sample print formats and overall design for ERPNext. 4 | 5 | Check [recod_erpnext_design/docs/assets](https://github.com/Monogramm/recod_erpnext_design/tree/master/recod_erpnext_design/docs/assets) for the screenshots. 6 | 7 | For the user guide and technical documentation, check the Frappe [app documentation](https://github.com/Monogramm/recod_erpnext_design/blob/master/recod_erpnext_design/docs) or compile it locally using [recod_frappe_devtools](https://github.com/Monogramm/recod_frappe_devtools). 8 | 9 | ## Recod Print Formats 10 | 11 | **Recod ERPNext Design** bundles several print formats to complete Frappe / ERPNext default ones. 12 | To use them, you can simply select one when you wish to print or display the PDF of a document. 13 | 14 | You can also go to the "_Print Format_" and make it the default for a kind of document. 15 | 16 | ## Recod Website 17 | 18 | **Recod ERPNext Design** also bundles several website themes. 19 | To use them, go to "_Website Settings_" and apply one of the available themes. 20 | 21 | ## Contributing 22 | 23 | For information about contributing, see the [Contributing page](https://github.com/Monogramm/recod_erpnext_design/blob/master/CONTRIBUTING.md). 24 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM monogramm/docker-erpnext:11-debian 2 | 3 | # Install Google Chrome & Chrome WebDriver for UI tests 4 | RUN set -ex; \ 5 | sudo apt-get update -q; \ 6 | sudo apt-get install -y --no-install-recommends \ 7 | unzip \ 8 | ; \ 9 | CHROMEDRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`; \ 10 | sudo mkdir -p "/opt/chromedriver-${CHROMEDRIVER_VERSION}"; \ 11 | sudo curl -sS -o /tmp/chromedriver_linux64.zip "http://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip"; \ 12 | sudo unzip -qq /tmp/chromedriver_linux64.zip -d "/opt/chromedriver-${CHROMEDRIVER_VERSION}"; \ 13 | sudo rm /tmp/chromedriver_linux64.zip; \ 14 | sudo chmod +x "/opt/chromedriver-${CHROMEDRIVER_VERSION}/chromedriver"; \ 15 | sudo ln -fs "/opt/chromedriver-${CHROMEDRIVER_VERSION}/chromedriver" /usr/local/bin/chromedriver; \ 16 | export PATH="${PATH};/usr/local/bin/chromedriver" 17 | 18 | # Build environment variables 19 | ARG FRAPPE_APP_TO_TEST=${FRAPPE_APP_TO_TEST} 20 | 21 | 22 | # Copy the whole repository to app folder for manual install 23 | COPY --chown=frappe:frappe . "/home/$FRAPPE_USER/frappe-bench/apps/${FRAPPE_APP_TO_TEST}" 24 | 25 | # Install current app 26 | RUN set -ex; \ 27 | ./env/bin/pip install -q -U -e "./apps/${FRAPPE_APP_TO_TEST}"; \ 28 | bench build --app "${FRAPPE_APP_TO_TEST}" 29 | 30 | VOLUME "/home/${FRAPPE_USER}/frappe-bench/apps/${FRAPPE_APP_TO_TEST}/public" 31 | -------------------------------------------------------------------------------- /.github/config.yml: -------------------------------------------------------------------------------- 1 | # Configuration for new-issue-welcome - https://github.com/behaviorbot/new-issue-welcome 2 | 3 | # Comment to be posted to on first time issues 4 | newIssueWelcomeComment: > 5 | Thanks for opening your first issue here! Be sure to follow the issue template! 6 | 7 | # Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome 8 | 9 | # Comment to be posted to on PRs from first time contributors in your repository 10 | newPRWelcomeComment: > 11 | Thanks for opening this pull request! Please check out our contributing guidelines. 12 | 13 | # Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge 14 | 15 | # Comment to be posted to on pull requests merged by a first time user 16 | firstPRMergeComment: > 17 | :tada: Congrats on merging your first pull request! We here at behaviorbot are proud of you! 18 | 19 | # It is recommend to include as many gifs and emojis as possible 20 | 21 | # Configuration for request-info - https://github.com/behaviorbot/request-info 22 | 23 | # *Required* Comment to reply with 24 | requestInfoReplyComment: > 25 | We would appreciate it if you could provide us with more info about this issue/pr! 26 | 27 | # *OPTIONAL* default titles to check against for lack of descriptiveness 28 | # MUST BE ALL LOWERCASE 29 | requestInfoDefaultTitles: 30 | - update readme.md 31 | - updates 32 | 33 | 34 | # *OPTIONAL* Label to be added to Issues and Pull Requests with insufficient information given 35 | requestInfoLabelToAdd: needs-more-info 36 | -------------------------------------------------------------------------------- /recod_erpnext_design/tests/test_config_docs.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2021, Monogramm and Contributors 3 | # See license.txt 4 | 5 | import unittest 6 | 7 | from recod_erpnext_design.config.docs import source_link, docs_base_url, headline, sub_heading, get_context 8 | 9 | 10 | class TestDocs(unittest.TestCase): 11 | def test_docs(self): 12 | self.assertIsNotNone(source_link) 13 | self.assertIsNotNone(docs_base_url) 14 | self.assertIsNotNone(headline) 15 | self.assertIsNotNone(sub_heading) 16 | 17 | def test_get_context(self): 18 | context = type('obj', (object,), {'brand_html': None, 19 | 'source_link': None, 20 | 'docs_base_url': None, 21 | 'headline': None, 22 | 'sub_heading': None}) 23 | 24 | get_context(context) 25 | 26 | self.assertIsNotNone(context) 27 | 28 | self.assertIsNotNone(context.brand_html) 29 | 30 | self.assertIsNotNone(context.source_link) 31 | self.assertEqual(context.source_link, source_link) 32 | 33 | self.assertIsNotNone(context.docs_base_url) 34 | self.assertEqual(context.docs_base_url, docs_base_url) 35 | 36 | self.assertIsNotNone(context.headline) 37 | self.assertEqual(context.headline, headline) 38 | 39 | self.assertIsNotNone(context.sub_heading) 40 | self.assertEqual(context.sub_heading, sub_heading) 41 | -------------------------------------------------------------------------------- /.travis/Dockerfile.debian: -------------------------------------------------------------------------------- 1 | FROM monogramm/docker-erpnext:%%VERSION%%-debian 2 | 3 | # Install Google Chrome & Chrome WebDriver for UI tests 4 | RUN set -ex; \ 5 | sudo apt-get update -q; \ 6 | sudo apt-get install -y --no-install-recommends \ 7 | unzip \ 8 | ; \ 9 | CHROMEDRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`; \ 10 | sudo mkdir -p /opt/chromedriver-$CHROMEDRIVER_VERSION; \ 11 | sudo curl -sS -o /tmp/chromedriver_linux64.zip http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip; \ 12 | sudo unzip -qq /tmp/chromedriver_linux64.zip -d /opt/chromedriver-$CHROMEDRIVER_VERSION; \ 13 | sudo rm /tmp/chromedriver_linux64.zip; \ 14 | sudo chmod +x /opt/chromedriver-$CHROMEDRIVER_VERSION/chromedriver; \ 15 | sudo ln -fs /opt/chromedriver-$CHROMEDRIVER_VERSION/chromedriver /usr/local/bin/chromedriver; \ 16 | export PATH="$PATH;/usr/local/bin/chromedriver" 17 | 18 | # Build environment variables 19 | ENV DOCKER_TAG=travis \ 20 | DOCKER_VCS_REF=${TRAVIS_COMMIT} \ 21 | DOCKER_BUILD_DATE=${TRAVIS_BUILD_NUMBER} 22 | 23 | # Copy the whole repository to app folder for manual install 24 | 25 | ARG BUILD_BRANCH 26 | ARG BUILD_URL 27 | ARG BUILD_APP 28 | 29 | RUN set -ex; \ 30 | sudo apt-get update -q; \ 31 | sudo apt-get install -y --no-install-recommends \ 32 | #add your system packages 33 | ; \ 34 | sudo rm -rf /var/lib/apt/lists/*; \ 35 | sudo mkdir -p "/home/$FRAPPE_USER"/frappe-bench/logs; \ 36 | sudo touch "/home/$FRAPPE_USER"/frappe-bench/logs/bench.log; \ 37 | sudo chmod 777 \ 38 | "/home/$FRAPPE_USER"/frappe-bench/logs \ 39 | "/home/$FRAPPE_USER"/frappe-bench/logs/* \ 40 | ; \ 41 | bench get-app --branch "${BUILD_BRANCH}" "${BUILD_APP}" "${BUILD_URL}" 42 | 43 | VOLUME "/home/${FRAPPE_USER}/frappe-bench/apps/${BUILD_APP}/public" 44 | -------------------------------------------------------------------------------- /.travis/Dockerfile.debian-slim: -------------------------------------------------------------------------------- 1 | FROM monogramm/docker-erpnext:%%VERSION%%-debian-slim 2 | 3 | # Install Google Chrome & Chrome WebDriver for UI tests 4 | RUN set -ex; \ 5 | sudo apt-get update -q; \ 6 | sudo apt-get install -y --no-install-recommends \ 7 | iputils-ping \ 8 | unzip \ 9 | ; \ 10 | CHROMEDRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`; \ 11 | sudo mkdir -p /opt/chromedriver-$CHROMEDRIVER_VERSION; \ 12 | sudo curl -sS -o /tmp/chromedriver_linux64.zip http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip; \ 13 | sudo unzip -qq /tmp/chromedriver_linux64.zip -d /opt/chromedriver-$CHROMEDRIVER_VERSION; \ 14 | sudo rm /tmp/chromedriver_linux64.zip; \ 15 | sudo chmod +x /opt/chromedriver-$CHROMEDRIVER_VERSION/chromedriver; \ 16 | sudo ln -fs /opt/chromedriver-$CHROMEDRIVER_VERSION/chromedriver /usr/local/bin/chromedriver; \ 17 | export PATH="$PATH;/usr/local/bin/chromedriver" 18 | 19 | # Build environment variables 20 | ENV DOCKER_TAG=travis \ 21 | DOCKER_VCS_REF=${TRAVIS_COMMIT} \ 22 | DOCKER_BUILD_DATE=${TRAVIS_BUILD_NUMBER} 23 | 24 | # Copy the whole repository to app folder for manual install 25 | 26 | ARG BUILD_BRANCH 27 | ARG BUILD_URL 28 | ARG BUILD_APP 29 | 30 | RUN set -ex; \ 31 | sudo apt-get update -q; \ 32 | sudo apt-get install -y --no-install-recommends \ 33 | #add you system libraries 34 | ; \ 35 | sudo rm -rf /var/lib/apt/lists/*; \ 36 | sudo mkdir -p "/home/$FRAPPE_USER"/frappe-bench/logs; \ 37 | sudo touch "/home/$FRAPPE_USER"/frappe-bench/logs/bench.log; \ 38 | sudo chmod 777 \ 39 | "/home/$FRAPPE_USER"/frappe-bench/logs \ 40 | "/home/$FRAPPE_USER"/frappe-bench/logs/* \ 41 | ; \ 42 | bench get-app --branch "${BUILD_BRANCH}" "${BUILD_APP}" "${BUILD_URL}" 43 | 44 | VOLUME "/home/${FRAPPE_USER}/frappe-bench/apps/${BUILD_APP}/public" 45 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | First of all, **thank you** for contributing, **you are awesome**! 4 | 5 | You can report bugs or request new features by creating an [issue](https://github.com/Monogramm/recod_erpnext_design/issues), or submit a [pull request](https://github.com/Monogramm/recod_erpnext_design/pulls) with your contribution. 6 | 7 | Here are a few rules to follow in order to ease code reviews and discussions before maintainers accept and merge your work. 8 | 9 | You MUST follow the [Best of the Best Practices (BOBP) Guide for Python](https://gist.github.com/sloria/7001839). If you don't know about any of them, you should really read the recommendations. 10 | 11 | You MUST run the CI test suite and ensure it is successful. If you haven't enabled it on your fork, it will be automatically triggered when opening/pushing a Pull Request (PR). 12 | 13 | You SHOULD write documentation. 14 | 15 | Please, write [commit messages that make sense](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html), and [rebase your branch](http://git-scm.com/book/en/Git-Branching-Rebasing) before submitting your Pull Request. 16 | 17 | You MUST use the `develop` branch as the base of your Pull Request. 18 | 19 | If possible, use [gitmoji](https://gitmoji.carloscuesta.me/) in your commit message to ease code reviews. 20 | 21 | One may ask you to [squash your commits](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html) too. This is used to "clean" your Pull Request before merging it (we don't want commits such as `fix tests`, `fix 2`, `fix 3`, etc.). 22 | 23 | Also, while creating your Pull Request on GitHub, you MUST write a description which gives the context and/or explains why you are creating it. If your Pull Request is related to one or several issues, you SHOULD reference them in your PR description. See GitHub documentation on [how to close issues using keywords](https://help.github.com/en/articles/closing-issues-using-keywords). 24 | 25 | Thank you! 26 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "globals": { 3 | "frappe": true, 4 | "__": true, 5 | "_p": true, 6 | "_f": true, 7 | "repl": true, 8 | "Class": true, 9 | "locals": true, 10 | "cint": true, 11 | "cstr": true, 12 | "cur_frm": true, 13 | "cur_dialog": true, 14 | "cur_page": true, 15 | "cur_list": true, 16 | "cur_tree": true, 17 | "msg_dialog": true, 18 | "is_null": true, 19 | "in_list": true, 20 | "has_common": true, 21 | "has_words": true, 22 | "validate_email": true, 23 | "get_number_format": true, 24 | "format_number": true, 25 | "format_currency": true, 26 | "comment_when": true, 27 | "open_url_post": true, 28 | "toTitle": true, 29 | "lstrip": true, 30 | "strip": true, 31 | "strip_html": true, 32 | "replace_all": true, 33 | "flt": true, 34 | "precision": true, 35 | "CREATE": true, 36 | "AMEND": true, 37 | "CANCEL": true, 38 | "copy_dict": true, 39 | "get_number_format_info": true, 40 | "print_table": true, 41 | "Layout": true, 42 | "web_form_settings": true, 43 | "$c": true, 44 | "$a": true, 45 | "$i": true, 46 | "$bg": true, 47 | "$y": true, 48 | "$c_obj": true, 49 | "refresh_many": true, 50 | "refresh_field": true, 51 | "toggle_field": true, 52 | "get_field_obj": true, 53 | "get_query_params": true, 54 | "unhide_field": true, 55 | "hide_field": true, 56 | "set_field_options": true, 57 | "getCookie": true, 58 | "getCookies": true, 59 | "get_url_arg": true, 60 | "md5": true, 61 | "$": true, 62 | "jQuery": true, 63 | "moment": true, 64 | "hljs": true, 65 | "Awesomplete": true, 66 | "Sortable": true, 67 | "Showdown": true, 68 | "Taggle": true, 69 | "Gantt": true, 70 | "Slick": true, 71 | "Webcam": true, 72 | "PhotoSwipe": true, 73 | "PhotoSwipeUI_Default": true, 74 | "fluxify": true, 75 | "io": true, 76 | "QUnit": true, 77 | "JsBarcode": true, 78 | "L": true, 79 | "Chart": true, 80 | "DataTable": true 81 | } 82 | } -------------------------------------------------------------------------------- /.travis/docker-nginx.conf: -------------------------------------------------------------------------------- 1 | 2 | upstream bench-frappe { 3 | server erpnext_app:8000 fail_timeout=0; 4 | } 5 | 6 | upstream bench-socketio-server { 7 | server erpnext_socketio:3000 fail_timeout=0; 8 | } 9 | 10 | server { 11 | listen 80; 12 | 13 | server_name localhost; 14 | 15 | root /home/frappe/frappe-bench/sites; 16 | 17 | location /assets { 18 | try_files $uri =404; 19 | } 20 | 21 | location ~ ^/protected/(.*) { 22 | internal; 23 | try_files /$host/$1 =404; 24 | } 25 | 26 | location /socket.io { 27 | proxy_http_version 1.1; 28 | proxy_set_header Upgrade $http_upgrade; 29 | proxy_set_header Connection "upgrade"; 30 | proxy_set_header X-Frappe-Site-Name $host; 31 | proxy_set_header Origin $scheme://$http_host; 32 | proxy_set_header Host $host; 33 | 34 | proxy_pass http://bench-socketio-server; 35 | } 36 | 37 | location / { 38 | try_files /$host/public/$uri @webserver; 39 | } 40 | 41 | location @webserver { 42 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 43 | proxy_set_header X-Forwarded-Proto $scheme; 44 | proxy_set_header X-Frappe-Site-Name $host; 45 | proxy_set_header Host $host; 46 | proxy_set_header X-Use-X-Accel-Redirect True; 47 | proxy_read_timeout 300; 48 | proxy_redirect off; 49 | 50 | proxy_pass http://bench-frappe; 51 | } 52 | 53 | # error pages 54 | error_page 502 /502.html; 55 | location /502.html { 56 | root /home/frappe/bench-repo/bench/config/templates; 57 | internal; 58 | } 59 | 60 | # optimizations 61 | sendfile on; 62 | keepalive_timeout 15; 63 | client_max_body_size 50m; 64 | client_body_buffer_size 16K; 65 | client_header_buffer_size 1k; 66 | 67 | # enable gzip compresion 68 | # based on https://mattstauffer.co/blog/enabling-gzip-on-nginx-servers-including-laravel-forge 69 | gzip on; 70 | gzip_http_version 1.1; 71 | gzip_comp_level 5; 72 | gzip_min_length 256; 73 | gzip_proxied any; 74 | gzip_vary on; 75 | gzip_types 76 | application/atom+xml 77 | application/javascript 78 | application/json 79 | application/rss+xml 80 | application/vnd.ms-fontobject 81 | application/x-font-ttf 82 | application/font-woff 83 | application/x-web-app-manifest+json 84 | application/xhtml+xml 85 | application/xml 86 | font/opentype 87 | image/svg+xml 88 | image/x-icon 89 | text/css 90 | text/plain 91 | text/x-component 92 | ; 93 | # text/html is always compressed by HttpGzipModule 94 | } 95 | -------------------------------------------------------------------------------- /recod_erpnext_design/docs/user/index.md: -------------------------------------------------------------------------------- 1 | # **Recod ERPNext Design** User Guide 2 | 3 | This is the User Guide for **Recod ERPNext Design**. 4 | 5 | **Recod ERPNext Design** is an ERPNext application to provide new sample print formats and overall design for ERPNext. 6 | 7 | ## Recod Print Formats 8 | 9 | **Recod ERPNext Design** bundles several print formats to complete Frappe / ERPNext default ones. 10 | To use them, you can simply select one when you wish to print or display the PDF of a document. 11 | 12 | You can also go to the "_Print Format_" and make it the default for a kind of document. 13 | 14 | ### Recod Sales Invoice 15 | 16 | ![Recod Sales Invoice](./assets/recod_print_format_sales_invoice.png "Recod Sales Invoice") 17 | 18 | ### Recod Purchase Invoice 19 | 20 | ![Recod Purchase Invoice](./assets/recod_print_format_purchase_invoice.png "Recod Purchase Invoice") 21 | 22 | ### Recod Quotation 23 | 24 | ![Recod Quotation](./assets/recod_print_format_quotation.png "Recod Quotation") 25 | 26 | ### Recod Salary Slip 27 | 28 | ![Recod Salary Slip](./assets/recod_print_format_salary_slip.png "Recod Salary Slip") 29 | 30 | ### Recod Delivery Note 31 | 32 | ![Recod Delivery Note](./assets/recod_print_format_delivery_note.png "Recod Delivery Note") 33 | 34 | ### Recod Purchase Order 35 | 36 | ![Recod Purchase Order](./assets/recod_print_format_purchase_order.png "Recod Purchase Order") 37 | 38 | ### Recod Request for Quotation 39 | 40 | ![Recod Request for Quotation](./assets/recod_print_format_request_for_quotation.png "Recod Request for Quotation") 41 | 42 | ### Recod Sales Order 43 | 44 | ![Recod Sales Order](./assets/recod_print_format_sales_order.png "Recod Sales Order") 45 | 46 | ## Recod Website 47 | 48 | **Recod ERPNext Design** also bundles several website themes. 49 | To use them, go to "_Website Settings_" and apply one of the available themes. 50 | 51 | ### Recod Light Theme 52 | 53 | ![Recod Website Light Theme](./assets/recod_website_theme_light.jpg "Recod Light Theme") 54 | 55 | ### Recod Dark Theme 56 | 57 | ![Recod Website Dark Theme](./assets/recod_website_theme_dark.jpg "Recod Dark Theme Header") 58 | 59 | ## Terms and Conditions 60 | 61 | ### Payment 20/30/50 by bank transfer 62 | 63 | ![20-30-50 screenshot](./assets/terms_and_conditions_20-30-50-by-bank-transfer.png "20-30-50 by bank transfer") 64 | 65 | ### Payment on delivery by bank transfer 66 | 67 | ![On delivery screenshot](./assets/terms_and_conditions_on_delivery.png "Terms and conditions on delivery") 68 | 69 | ### Payment on due date by bank transfer 70 | 71 | ![On due date screenshot](./assets/terms_and_conditions_on_due_date.png "On due date") 72 | 73 | ### Payment on receipt by bank transfer 74 | 75 | ![On receipt screenshot](./assets/terms_and_conditions_on_receipt.png "On receipt") 76 | 77 | ### Termsfeed 78 | 79 | > We used **[Termsfeed](https://app.termsfeed.com/)** services to generate the following Terms and conditions. 80 | 81 | **TODO** 82 | 83 | ## License 84 | 85 | Copyright © 2020 [Monogramm](https://github.com/Monogramm).
86 | This project is [AGPL v3](https://opensource.org/licenses/AGPL-3.0) licensed. 87 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | *.py~ 3 | *.comp.js 4 | *.DS_Store 5 | Thumbs.db 6 | locale 7 | .wnf-lang-status 8 | *.swp 9 | *.egg-info 10 | dist/ 11 | build/ 12 | recod_erpnext_design/docs/current 13 | .vscode 14 | .idea/ 15 | *.iml 16 | node_modules 17 | .kdev4/ 18 | *.kdev4 19 | *debug.log 20 | 21 | # Byte-compiled / optimized / DLL files 22 | __pycache__/ 23 | *.py[cod] 24 | *$py.class 25 | 26 | # C extensions 27 | *.so 28 | 29 | # Distribution / packaging 30 | .Python 31 | build/ 32 | develop-eggs/ 33 | dist/ 34 | downloads/ 35 | eggs/ 36 | .eggs/ 37 | lib/ 38 | lib64/ 39 | parts/ 40 | sdist/ 41 | var/ 42 | wheels/ 43 | *.egg-info/ 44 | .installed.cfg 45 | *.egg 46 | MANIFEST 47 | 48 | # PyInstaller 49 | # Usually these files are written by a python script from a template 50 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 51 | *.manifest 52 | *.spec 53 | 54 | # Installer logs 55 | pip-log.txt 56 | pip-delete-this-directory.txt 57 | 58 | # Unit test / coverage reports 59 | htmlcov/ 60 | .tox/ 61 | .coverage 62 | .coverage.* 63 | .cache 64 | nosetests.xml 65 | coverage.xml 66 | *.cover 67 | .hypothesis/ 68 | .pytest_cache/ 69 | 70 | # Codacy coverage 71 | .codacy-coverage 72 | get.sh 73 | 74 | # Translations 75 | *.mo 76 | *.pot 77 | 78 | # Django stuff: 79 | *.log 80 | .static_storage/ 81 | .media/ 82 | local_settings.py 83 | 84 | # Flask stuff: 85 | instance/ 86 | .webassets-cache 87 | 88 | # Scrapy stuff: 89 | .scrapy 90 | 91 | # Sphinx documentation 92 | docs/_build/ 93 | 94 | # PyBuilder 95 | target/ 96 | 97 | # Jupyter Notebook 98 | .ipynb_checkpoints 99 | 100 | # pyenv 101 | .python-version 102 | 103 | # celery beat schedule file 104 | celerybeat-schedule 105 | 106 | # SageMath parsed files 107 | *.sage.py 108 | 109 | # Environments 110 | #.env 111 | .venv 112 | env/ 113 | venv/ 114 | ENV/ 115 | env.bak/ 116 | venv.bak/ 117 | 118 | # Spyder project settings 119 | .spyderproject 120 | .spyproject 121 | 122 | # Rope project settings 123 | .ropeproject 124 | 125 | # mkdocs documentation 126 | /site 127 | 128 | # mypy 129 | .mypy_cache/ 130 | 131 | # Logs 132 | logs 133 | *.log 134 | npm-debug.log* 135 | yarn-debug.log* 136 | yarn-error.log* 137 | 138 | # Runtime data 139 | pids 140 | *.pid 141 | *.seed 142 | *.pid.lock 143 | 144 | # Directory for instrumented libs generated by jscoverage/JSCover 145 | lib-cov 146 | 147 | # Coverage directory used by tools like istanbul 148 | coverage 149 | 150 | # nyc test coverage 151 | .nyc_output 152 | 153 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 154 | .grunt 155 | 156 | # Bower dependency directory (https://bower.io/) 157 | bower_components 158 | 159 | # node-waf configuration 160 | .lock-wscript 161 | 162 | # Compiled binary addons (https://nodejs.org/api/addons.html) 163 | build/Release 164 | 165 | # Dependency directories 166 | node_modules/ 167 | jspm_packages/ 168 | 169 | # Typescript v1 declaration files 170 | typings/ 171 | 172 | # Optional npm cache directory 173 | .npm 174 | 175 | # Optional eslint cache 176 | .eslintcache 177 | 178 | # Optional REPL history 179 | .node_repl_history 180 | 181 | # Output of 'npm pack' 182 | *.tgz 183 | 184 | # Yarn Integrity file 185 | .yarn-integrity 186 | 187 | # dotenv environment variables file 188 | #.env 189 | 190 | # next.js build output 191 | .next 192 | 193 | # Frappe 194 | public/ 195 | services/ 196 | 197 | recod_erpnext_design/www/ 198 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | 4 | 5 | ## 1.2.0 (2020-09-20) 6 | 7 | ### Added 8 | 9 | - ✨ Add Recod Design for doctypes ([#6](https://github.com/Monogramm/recod_erpnext_design/issues/6)) \[[7174383](https://github.com/Monogramm/recod_erpnext_design/commit/7174383e36061062dda5fcca09ff7c598d754569)] 10 | 11 | ### Changed 12 | 13 | - 🎨 Remove background from existing doctypes ([#5](https://github.com/Monogramm/recod_erpnext_design/issues/5)) \[[fc2368f](https://github.com/Monogramm/recod_erpnext_design/commit/fc2368fbc31517a96f31a43780db3a0b751e474b)] 14 | - 🔧 Improve configuration \[[884f7f8](https://github.com/Monogramm/recod_erpnext_design/commit/884f7f883fa754fb05b5034ba7eb1d1620385599)] 15 | 16 | ### Fixed 17 | 18 | - 💚 Stop supporting Frappe 10 and Python 2 \[[c950fb0](https://github.com/Monogramm/recod_erpnext_design/commit/c950fb02367e2ec79be6398db763abca6a125a6f)] 19 | - 💚 Allow tests on all sites \[[6deed4b](https://github.com/Monogramm/recod_erpnext_design/commit/6deed4bb62f861125180feb050fdce512c020927)] 20 | 21 | ### Security 22 | 23 | - 🔒 Fix potential security vulnerabilities \[[dc74534](https://github.com/Monogramm/recod_erpnext_design/commit/dc745347d9eec4857d61f8b94cfac6d78f73a865)] 24 | 25 | ### Miscellaneous 26 | 27 | - 📝 Add links to generate Frappe docs. \[[534eb35](https://github.com/Monogramm/recod_erpnext_design/commit/534eb35cde22f8e1fe14dc68e3889f4b2c6c0ca1)] 28 | 29 | 30 | 31 | ## 1.1.0 (2020-07-15) 32 | 33 | ### Added 34 | 35 | - 📈 Send coverage from docker \[[182b22b](https://github.com/Monogramm/recod_erpnext_design/commit/182b22b1802d0b56963ae60da872797a113fb7b1)] 36 | 37 | ### Changed 38 | 39 | - 💄 Beautify Print Formats and add Terms And conditions ([#4](https://github.com/Monogramm/recod_erpnext_design/issues/4)) \[[060a4d7](https://github.com/Monogramm/recod_erpnext_design/commit/060a4d786d152c8ff815cab4a0eb774aafaba98a)] 40 | 41 | ### Fixed 42 | 43 | - 💚 Upgrade Travis linux to 18.04 \[[839e9b8](https://github.com/Monogramm/recod_erpnext_design/commit/839e9b8bdb6cbcc607a58223aed90816496d7a58)] 44 | 45 | ### Security 46 | 47 | - 🔒 Upgrade mem dependency \[[6f0886a](https://github.com/Monogramm/recod_erpnext_design/commit/6f0886aeae3aaafb7e40316132ab6dc23c051438)] 48 | 49 | 50 | 51 | ## 1.0.0 (2020-05-20) 52 | 53 | ### Added 54 | 55 | - ✨ Recod website themes \[[31e760f](https://github.com/Monogramm/recod_erpnext_design/commit/31e760f4b379bc7da8af46434cba4f349f5c3ef4)] 56 | - ✨ Recod print formats \[[92c4b8d](https://github.com/Monogramm/recod_erpnext_design/commit/92c4b8d9081e9fd3bbc37dd2e2f688e4afa28b6d)] 57 | - 🎉 Initialize template \[[78ca832](https://github.com/Monogramm/recod_erpnext_design/commit/78ca83233b94d8c581daf12ecd40057174876276)] 58 | 59 | ### Changed 60 | 61 | - 🔧 Add erpnext to requirements \[[ba14531](https://github.com/Monogramm/recod_erpnext_design/commit/ba14531b54344ae72658a7d656e2c47d49b376c2)] 62 | 63 | ### Fixed 64 | 65 | - 💚 Report coverage in travis \[[d8805a9](https://github.com/Monogramm/recod_erpnext_design/commit/d8805a925574ba245f1f1cbea0fe1b5bf2da0121)] 66 | 67 | ### Miscellaneous 68 | 69 | - 📝 Improve Github and Frappe app docs \[[fdb502b](https://github.com/Monogramm/recod_erpnext_design/commit/fdb502b6124399e3e1be6156de01bebcadf455d2)] 70 | - 📝 Frappe app documentation \[[ca52dd9](https://github.com/Monogramm/recod_erpnext_design/commit/ca52dd9974d8d806a2025d099481bdbbcc4b3536)] 71 | - Initial commit \[[c528584](https://github.com/Monogramm/recod_erpnext_design/commit/c528584e9fb1c452c5279b066184ab1d35800a1b)] 72 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | *.py~ 3 | *.comp.js 4 | *.DS_Store 5 | Thumbs.db 6 | locale 7 | .wnf-lang-status 8 | *.swp 9 | *.egg-info 10 | dist/ 11 | build/ 12 | recod_erpnext_design/docs/current 13 | .vscode 14 | .idea/ 15 | *.iml 16 | node_modules 17 | .kdev4/ 18 | *.kdev4 19 | *debug.log 20 | 21 | # Byte-compiled / optimized / DLL files 22 | __pycache__/ 23 | *.py[cod] 24 | *$py.class 25 | 26 | # C extensions 27 | *.so 28 | 29 | # Distribution / packaging 30 | .Python 31 | build/ 32 | develop-eggs/ 33 | dist/ 34 | downloads/ 35 | eggs/ 36 | .eggs/ 37 | lib/ 38 | lib64/ 39 | parts/ 40 | sdist/ 41 | var/ 42 | wheels/ 43 | *.egg-info/ 44 | .installed.cfg 45 | *.egg 46 | MANIFEST 47 | 48 | # PyInstaller 49 | # Usually these files are written by a python script from a template 50 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 51 | *.manifest 52 | *.spec 53 | 54 | # Installer logs 55 | pip-log.txt 56 | pip-delete-this-directory.txt 57 | 58 | # Unit test / coverage reports 59 | htmlcov/ 60 | .tox/ 61 | .coverage 62 | .coverage.* 63 | .cache 64 | nosetests.xml 65 | coverage.xml 66 | *.cover 67 | .hypothesis/ 68 | .pytest_cache/ 69 | 70 | # Codacy coverage 71 | .codacy-coverage 72 | get.sh 73 | 74 | # Translations 75 | *.mo 76 | *.pot 77 | 78 | # Django stuff: 79 | *.log 80 | .static_storage/ 81 | .media/ 82 | local_settings.py 83 | 84 | # Flask stuff: 85 | instance/ 86 | .webassets-cache 87 | 88 | # Scrapy stuff: 89 | .scrapy 90 | 91 | # Sphinx documentation 92 | docs/_build/ 93 | 94 | # PyBuilder 95 | target/ 96 | 97 | # Jupyter Notebook 98 | .ipynb_checkpoints 99 | 100 | # pyenv 101 | .python-version 102 | 103 | # celery beat schedule file 104 | celerybeat-schedule 105 | 106 | # SageMath parsed files 107 | *.sage.py 108 | 109 | # Environments 110 | #.env 111 | .venv 112 | env/ 113 | venv/ 114 | ENV/ 115 | env.bak/ 116 | venv.bak/ 117 | 118 | # Spyder project settings 119 | .spyderproject 120 | .spyproject 121 | 122 | # Rope project settings 123 | .ropeproject 124 | 125 | # mkdocs documentation 126 | /site 127 | 128 | # mypy 129 | .mypy_cache/ 130 | 131 | # Logs 132 | logs 133 | *.log 134 | npm-debug.log* 135 | yarn-debug.log* 136 | yarn-error.log* 137 | 138 | # Runtime data 139 | pids 140 | *.pid 141 | *.seed 142 | *.pid.lock 143 | 144 | # Directory for instrumented libs generated by jscoverage/JSCover 145 | lib-cov 146 | 147 | # Coverage directory used by tools like istanbul 148 | coverage 149 | 150 | # nyc test coverage 151 | .nyc_output 152 | 153 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 154 | .grunt 155 | 156 | # Bower dependency directory (https://bower.io/) 157 | bower_components 158 | 159 | # node-waf configuration 160 | .lock-wscript 161 | 162 | # Compiled binary addons (https://nodejs.org/api/addons.html) 163 | build/Release 164 | 165 | # Dependency directories 166 | node_modules/ 167 | jspm_packages/ 168 | 169 | # Typescript v1 declaration files 170 | typings/ 171 | 172 | # Optional npm cache directory 173 | .npm 174 | 175 | # Optional eslint cache 176 | .eslintcache 177 | 178 | # Optional REPL history 179 | .node_repl_history 180 | 181 | # Output of 'npm pack' 182 | *.tgz 183 | 184 | # Yarn Integrity file 185 | .yarn-integrity 186 | 187 | # dotenv environment variables file 188 | #.env 189 | 190 | # next.js build output 191 | .next 192 | 193 | # Frappe 194 | public/ 195 | services/ 196 | 197 | # Travis-CI 198 | .travis.yml 199 | 200 | # Jenkins 201 | Jenkisfile 202 | 203 | # DockerHub 204 | docker-compose.yml 205 | docker-compose.test.yml 206 | hooks/ 207 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | - Using welcoming and inclusive language 18 | - Being respectful of differing viewpoints and experiences 19 | - Gracefully accepting constructive criticism 20 | - Focusing on what is best for the community 21 | - Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | - The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | - Trolling, insulting/derogatory comments, and personal or political attacks 28 | - Public or private harassment 29 | - Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | - Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at opensource at monogramm dot io. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | 77 | -------------------------------------------------------------------------------- /recod_erpnext_design/hooks.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2021, Monogramm and Contributors 3 | # See license.txt 4 | """Configuration for hooks.""" 5 | 6 | from __future__ import unicode_literals 7 | from . import __version__ as app_version 8 | 9 | 10 | app_name = "recod_erpnext_design" 11 | app_title = "Recod ERPNext Design" 12 | app_publisher = "Monogramm" 13 | app_description = "ERPNext application to provide new sample print formats and overall design for ERPNext." 14 | app_icon = "octicon octicon-paintcan" 15 | app_color = "grey" 16 | app_email = "opensource@monogramm.io" 17 | app_license = "AGPL v3" 18 | 19 | # Includes in 20 | # ------------------ 21 | fixtures = ["Website Theme", "Print Format", "Terms and Conditions"] 22 | 23 | # include js, css files in header of desk.html 24 | # app_include_css = "/assets/recod_erpnext_design/css/recod_erpnext_design.css" 25 | # app_include_js = "/assets/recod_erpnext_design/js/recod_erpnext_design.js" 26 | 27 | # include js, css files in header of web template 28 | # web_include_css = "/assets/recod_erpnext_design/css/recod_erpnext_design.css" 29 | # web_include_js = "/assets/recod_erpnext_design/js/recod_erpnext_design.js" 30 | 31 | # include js in page 32 | # page_js = {"page" : "public/js/file.js"} 33 | 34 | # include js in doctype views 35 | # doctype_js = {"doctype" : "public/js/doctype.js"} 36 | # doctype_list_js = {"doctype" : "public/js/doctype_list.js"} 37 | # doctype_tree_js = {"doctype" : "public/js/doctype_tree.js"} 38 | # doctype_calendar_js = {"doctype" : "public/js/doctype_calendar.js"} 39 | 40 | # Home Pages 41 | # ---------- 42 | 43 | # application home page (will override Website Settings) 44 | # home_page = "login" 45 | 46 | # website user home page (by Role) 47 | # role_home_page = { 48 | # "Role": "home_page" 49 | # } 50 | 51 | # Website user home page (by function) 52 | # get_website_user_home_page = "recod_erpnext_design.utils.get_home_page" 53 | 54 | # Generators 55 | # ---------- 56 | 57 | # automatically create page for each record of this doctype 58 | # website_generators = ["Web Page"] 59 | 60 | # Installation 61 | # ------------ 62 | 63 | # before_install = "recod_erpnext_design.install.before_install" 64 | # after_install = "recod_erpnext_design.install.after_install" 65 | 66 | # Desk Notifications 67 | # ------------------ 68 | # See frappe.core.notifications.get_notification_config 69 | 70 | # notification_config = "recod_erpnext_design.notifications.get_notification_config" 71 | 72 | # Permissions 73 | # ----------- 74 | # Permissions evaluated in scripted ways 75 | 76 | # permission_query_conditions = { 77 | # "Event": "frappe.desk.doctype.event.event.get_permission_query_conditions", 78 | # } 79 | # 80 | # has_permission = { 81 | # "Event": "frappe.desk.doctype.event.event.has_permission", 82 | # } 83 | 84 | # Document Events 85 | # --------------- 86 | # Hook on document methods and events 87 | 88 | # doc_events = { 89 | # "*": { 90 | # "on_update": "method", 91 | # "on_cancel": "method", 92 | # "on_trash": "method" 93 | # } 94 | # } 95 | 96 | # Scheduled Tasks 97 | # --------------- 98 | 99 | # scheduler_events = { 100 | # "all": [ 101 | # "recod_erpnext_design.tasks.all" 102 | # ], 103 | # "daily": [ 104 | # "recod_erpnext_design.tasks.daily" 105 | # ], 106 | # "hourly": [ 107 | # "recod_erpnext_design.tasks.hourly" 108 | # ], 109 | # "weekly": [ 110 | # "recod_erpnext_design.tasks.weekly" 111 | # ] 112 | # "monthly": [ 113 | # "recod_erpnext_design.tasks.monthly" 114 | # ] 115 | # } 116 | 117 | # Testing 118 | # ------- 119 | 120 | # before_tests = "recod_erpnext_design.install.before_tests" 121 | 122 | # Overriding Whitelisted Methods 123 | # ------------------------------ 124 | # 125 | # override_whitelisted_methods = { 126 | # "frappe.desk.doctype.event.event.get_events": "recod_erpnext_design.event.get_events" 127 | # } 128 | 129 | -------------------------------------------------------------------------------- /manage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | . .env 5 | 6 | ########################################################### 7 | # Functions 8 | 9 | log() { 10 | echo "[${0}] [$(date +%Y-%m-%dT%H:%M:%S)] ${1}" 11 | } 12 | 13 | dc() { 14 | docker-compose -f ${@} 15 | } 16 | 17 | build() { 18 | log 'Building container(s)...' 19 | dc "${1}" build ${@:2} 20 | # (dirty) trick to allow edition of files generated from docker group 21 | chmod -R g+w . 22 | } 23 | 24 | start() { 25 | log 'Starting container(s)...' 26 | dc "${1}" up -d ${@:2} 27 | } 28 | 29 | stop() { 30 | log 'Stopping container(s)...' 31 | dc "${1}" stop ${@:2} 32 | } 33 | 34 | restart() { 35 | log 'Restarting container(s)...' 36 | dc "${1}" restart ${@:2} 37 | } 38 | 39 | ps() { 40 | log 'Listing container(s)...' 41 | dc "${1}" ps ${@:2} 42 | } 43 | 44 | logs() { 45 | log 'Following container(s) logs (Ctrl + C to stop)...' 46 | dc "${1}" logs -f ${@:2} 47 | } 48 | 49 | down() { 50 | log 'Stopping and removing container(s) and data...' 51 | dc "${1}" down ${@:2} 52 | rm -rf "${ERPNEXT_HOME:-/srv/recod_erpnext_design/frappe}"/* 53 | } 54 | 55 | console() { 56 | dc -it "${1}" exec erpnext_app bench console ${@:2} 57 | } 58 | 59 | ## TODO Add function to initialize from template 60 | # - Replace all occurences of `recod_erpnext_design` and `Recod ERPNext Design` in all files 61 | # - Rename all directories `recod_erpnext_design` 62 | 63 | prepare_release() { 64 | NEW_VERSION=${1} 65 | if [ -z "${NEW_VERSION}" ] ; then 66 | log 'Missing release version!' 67 | return 1; 68 | fi 69 | 70 | log 'Updating Frappe app version...' 71 | sed -i \ 72 | -e "s|__version__ = '.*'|__version__ = '${NEW_VERSION}'|g" \ 73 | ./recod_erpnext_design/__init__.py 74 | 75 | log 'Updating gitmoji-changelog version...' 76 | sed -i \ 77 | -e "s|\"version\": \".*\"|\"version\": \"${NEW_VERSION}\"|g" \ 78 | ./.gitmoji-changelogrc 79 | 80 | # Generate Changelog for version 81 | log "Generating Changelog for version '${NEW_VERSION}'..." 82 | npm install 83 | npm run gitmoji-changelog 84 | 85 | # TODO Add and commit to git with message `:bookmark: Release X.Y.Z` 86 | } 87 | 88 | usage() { 89 | echo "usage: ./manage.sh COMMAND [ARGUMENTS] 90 | 91 | Commands: 92 | build Build Dev env 93 | start Start Dev env 94 | restart Retart Dev env 95 | stop Stop Dev env 96 | test Start and follow Dev env test container 97 | ps List Dev env containers 98 | logs Follow logs of Dev env 99 | down Stop and remove Dev env 100 | console Send command to Dev env bench console 101 | prepare-release Prepare Frappe app release 102 | " 103 | } 104 | 105 | ########################################################### 106 | # Runtime 107 | 108 | case "${1}" in 109 | # DEV env 110 | build) build docker-compose.yml ${@:2};; 111 | start) start docker-compose.yml ${@:2};; 112 | restart) restart docker-compose.yml ${@:2};; 113 | stop) stop docker-compose.yml ${@:2};; 114 | test) start docker-compose.yml sut 115 | logs docker-compose.yml sut;; 116 | ps) ps docker-compose.yml ${@:2};; 117 | logs) logs docker-compose.yml ${@:2};; 118 | down) down docker-compose.yml ${@:2};; 119 | console) console docker-compose.yml ${@:2};; 120 | prepare-release) prepare_release ${@:2};; 121 | # PROD env 122 | #build) TAG=${DOCKER_TAG} \ 123 | # VCS_REF=`git rev-parse --short HEAD` \ 124 | # BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ 125 | # build .travis/docker-compose.yml ${@:2};; 126 | #start) start .travis/docker-compose.mariadb.yml ${@:2};; 127 | #restart) restart .travis/docker-compose.mariadb.yml ${@:2};; 128 | #stop) stop .travis/docker-compose.mariadb.yml ${@:2};; 129 | #logs) logs .travis/docker-compose.mariadb.yml ${@:2};; 130 | #down) down .travis/docker-compose.mariadb.yml ${@:2};; 131 | #console) console .travis/docker-compose.mariadb.yml ${@:2};; 132 | # Help 133 | *) usage;; 134 | esac 135 | 136 | exit 0 137 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![License: AGPL v3][uri_license_image]][uri_license] 2 | [![Docs](https://img.shields.io/badge/Docs-Github%20Pages-blue)](https://monogramm.github.io/recod_erpnext_design/) 3 | [![gitmoji-changelog](https://img.shields.io/badge/Changelog-gitmoji-blue.svg)](https://github.com/frinyvonnick/gitmoji-changelog) 4 | [![Managed with Taiga.io](https://img.shields.io/badge/managed%20with-TAIGA.io-709f14.svg)](https://tree.taiga.io/project/monogrammbot-monogrammrecod_erpnext_design/ "Managed with Taiga.io") 5 | [![Build Status](https://travis-ci.org/Monogramm/recod_erpnext_design.svg)](https://travis-ci.org/Monogramm/recod_erpnext_design) 6 | [![Coverage Status](https://coveralls.io/repos/github/Monogramm/recod_erpnext_design/badge.svg?branch=master)](https://coveralls.io/github/Monogramm/recod_erpnext_design?branch=master) 7 | [![Codacy Badge](https://api.codacy.com/project/badge/Grade/347f10fa884446c492b6ba8cd7f4d7fc)](https://app.codacy.com/gh/Monogramm/recod_erpnext_design?utm_source=github.com&utm_medium=referral&utm_content=Monogramm/recod_erpnext_design&utm_campaign=Badge_Grade_Dashboard) 8 | 13 | 14 | ## Recod ERPNext Design 15 | 16 | > :alembic: ERPNext application to provide new sample print formats and overall design for ERPNext. 17 | 18 | ## :blue_book: Docs 19 | 20 | See GitHub Pages at [monogramm.github.io/recod_erpnext_design](https://monogramm.github.io/recod_erpnext_design/). 21 | 22 | ## :chart_with_upwards_trend: Changes 23 | 24 | All notable changes to this project will be documented in [CHANGELOG](./CHANGELOG.md) file. 25 | This CHANGELOG is generated with :heart: by [gitmoji-changelog](https://github.com/frinyvonnick/gitmoji-changelog). 26 | 27 | This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 28 | 29 | ## :bookmark: Roadmap 30 | 31 | See [Taiga.io](https://tree.taiga.io/project/monogrammbot-monogrammrecod_erpnext_design/ "Taiga.io monogrammbot-monogrammrecod_erpnext_design") 32 | 33 | ## :construction: Install 34 | 35 | **Install Frappe application** 36 | 37 | ```sh 38 | bench get-app https://github.com/Monogramm/recod_erpnext_design 39 | bench install-app recod_erpnext_design 40 | ``` 41 | 42 | Check [Frappe Install](https://github.com/frappe/frappe/wiki/The-Hitchhiker%27s-Guide-to-Installing-Frappe-on-Linux) for more details. 43 | 44 | ## :white_check_mark: Run tests 45 | 46 | ```sh 47 | bench run-tests --app recod_erpnext_design 48 | ``` 49 | 50 | Check [Frappe Unit Testing](https://frappe.io/docs/user/en/guides/automated-testing/unit-testing) for more details. 51 | 52 | When installing Frappe app, the following python requirements will be installed: 53 | 54 | ## :rocket: Usage 55 | 56 | How to use this application improve ERPNext print formats, website themes, etc... 57 | 58 | 64 | 65 | ## :bust_in_silhouette: Authors 66 | 67 | **Monogramm** 68 | 69 | - Website: 70 | - Github: [@Monogramm](https://github.com/Monogramm) 71 | 72 | **AminovE99** 73 | 74 | - Website: 75 | - Github: [@AminovE99](https://github.com/AminovE99) 76 | 77 | ## :handshake: Contributing 78 | 79 | Contributions, issues and feature requests are welcome!
Feel free to check [issues page](https://github.com/Monogramm/recod_erpnext_design/issues). 80 | [Check the contributing guide](./CONTRIBUTING.md).
81 | 82 | ## :thumbsup: Show your support 83 | 84 | Give a :star: if this project helped you! 85 | 86 | ## :page_facing_up: License 87 | 88 | Copyright © 2020 [Monogramm](https://github.com/Monogramm).
89 | This project is [AGPL v3](uri_license) licensed. 90 | 91 | * * * 92 | 93 | _This README was generated with :heart: by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_ 94 | 95 | [uri_license]: https://opensource.org/licenses/AGPL-3.0 96 | 97 | [uri_license_image]: https://img.shields.io/badge/license-AGPL%20v3-blue 98 | -------------------------------------------------------------------------------- /recod_erpnext_design/fixtures/website_theme.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "apply_style": 1, 4 | "apply_text_styles": 1, 5 | "background_color": "#333333", 6 | "background_image": null, 7 | "bootstrap": null, 8 | "css": "/*!\n * Recod ERPNext Design (https://github.com/Monogramm/recod_erpnext_design)\n * Copyright 2020 Monogramm\n * Licensed under AGPL v3 (https://github.com/Monogramm/recod_erpnext_design/blob/master/LICENSE)\n */\n\n/* Base */\nbody {\n color: #ddd;\n background-color: #333 !important;\n}\n\ncode {\n background-color: #150a0ddd;\n}\npre {\n color: #ddd;\n background-color: #150a0ddd;\n border-color: rgba(0, 0, 0, .35);\n}\n\n#freeze {\n background-color: #36414C;\n}\n\n/* Navbars */\n.navbar-default .navbar-toggle {\n border-color: rgba(0, 0, 0, .35);\n}\n.navbar-default .navbar-toggle:hover, .navbar-default .navbar-toggle:focus {\n background-color: #555;\n}\n.navbar-toggle {\n margin-top: 0;\n margin-bottom: 0;\n}\n\n/* Drop downs */\n.dropdown-menu {\n background-color: #2C2C2C;\n border-color: rgba(0, 0, 0, .35);\n box-shadow: 0 6px 12px rgba(0, 0, 0, .375);\n}\n.dropdown-menu > li > a {\n color: #CCCCCC;\n}\n.dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus {\n color: #FCFCFC;\n background-color: #444444;\n}\n\n/* Side menu */\n.nav > li > a:hover, .nav > li > a:focus {\n background-color: #444;\n}\n.nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus {\n background-color: #3c3c3c;\n}\n\n.layout-side-section .overlay-sidebar {\n background-color: #333;\n}\n\n.web-sidebar .sidebar-item a.active {\n color: #fcfcfc;\n}\n\n/* Modals */\n.modal-content {\n background-color: #2c2c2c;\n}\n\n/* Page */\nbody .hero-and-content {\n background-color: rgba(51, 51, 51, .902);\n}\nbody .page-card {\n background-color: #2c2c2c;\n border-color: #111;\n}\nbody .page-card .page-card-head {\n border-color: #111;\n}\nbody .page-card .page-card-head .indicator {\n color: #ddd;\n}\n\n/* Forms */\n.form-control {\n color: #dddddd;\n background-color: #11111188;\n border-color: #555;\n}\n.form-control.bold {\n color: #fcfcfc;\n background-color: #222;\n}\n\n/* Buttons */\n.btn-default {\n background-color: #3c3c3c;\n}\n.btn-default:hover, .btn-default:focus, .btn-default.focus, .btn-default:active, .btn-default.active, .open > .dropdown-toggle.btn-default {\n background-color: #555;\n border-color: rgba(0, 0, 0, 0);\n}\n\n/* Chat */\n.panel {\n background-color: #333;\n}\n.panel-default {\n border-color: #111;\n}\n.panel-default > .panel-heading {\n color: #ddd;\n background-color: #2c2c2c;\n border-color: #111;\n}\n\n.frappe-chat > .frappe-chat-popper > .frappe-chat-popper-collapse > .panel.panel-bg {\n background-image: none;\n}\n.chat-room-footer .chat-form {\n border-color: #111;\n}\n.chat-room-footer .chat-form .input-group-btn .btn {\n background: #222;\n}\n.chat-list .chat-list-item .chat-bubble .chat-bubble-content {\n color: #111;\n}\n\n/* Footer */\n.footer-subscribe .btn-default {\n border-color: #555;\n}\n\n/* Others */\n.product-image.missing-image {\n background-color: #1c1c1c;\n}\n", 9 | "custom": 1, 10 | "docstatus": 0, 11 | "doctype": "Website Theme", 12 | "font_size": "14px", 13 | "footer_color": "#222222", 14 | "footer_text_color": "#CCCCCC", 15 | "heading_style": "", 16 | "heading_webfont": "Open Sans", 17 | "js": null, 18 | "link_color": "#3B99FC", 19 | "modified": "2020-05-08 22:12:31.870547", 20 | "module": "Website", 21 | "name": "Recod Dark", 22 | "parent": null, 23 | "parentfield": null, 24 | "parenttype": null, 25 | "text_color": "#FCFCFC", 26 | "text_webfont": "Roboto", 27 | "theme": "Recod Dark", 28 | "top_bar_color": "#222222", 29 | "top_bar_text_color": "#DDDDDD" 30 | }, 31 | { 32 | "apply_style": 1, 33 | "apply_text_styles": 1, 34 | "background_color": "#FFFFFF", 35 | "background_image": null, 36 | "bootstrap": null, 37 | "css": "/*!\n * Recod ERPNext Design (https://github.com/Monogramm/recod_erpnext_design)\n * Copyright 2020 Monogramm\n * Licensed under AGPL v3 (https://github.com/Monogramm/recod_erpnext_design/blob/master/LICENSE)\n */\n\n/* Navbars */\n.navbar-toggle {\n margin-top: 0;\n margin-bottom: 0;\n}\n", 38 | "custom": 1, 39 | "docstatus": 0, 40 | "doctype": "Website Theme", 41 | "font_size": "14px", 42 | "footer_color": "#F5F7FA", 43 | "footer_text_color": "#8D99A6", 44 | "heading_style": "", 45 | "heading_webfont": "Open Sans", 46 | "js": null, 47 | "link_color": "#5E64FF", 48 | "modified": "2020-05-06 22:12:50.284307", 49 | "module": "Website", 50 | "name": "Recod Light", 51 | "parent": null, 52 | "parentfield": null, 53 | "parenttype": null, 54 | "text_color": "#36414C", 55 | "text_webfont": "Roboto", 56 | "theme": "Recod Light", 57 | "top_bar_color": "#F5F7FA", 58 | "top_bar_text_color": "#8D99A6" 59 | } 60 | ] -------------------------------------------------------------------------------- /.travis/docker_test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/sh 2 | 3 | set -e 4 | 5 | ################################################################################ 6 | # Testing docker containers 7 | 8 | echo "Waiting to ensure everything is fully ready for the tests..." 9 | sleep 60 10 | 11 | echo "Checking content of sites directory..." 12 | if [ ! -f "./sites/apps.txt" ] || [ ! -f "./sites/.docker-app-init" ] || [ ! -f "./sites/currentsite.txt" ] || [ ! -f "./sites/.docker-site-init" ] || [ ! -f "./sites/.docker-init" ]; then 13 | echo 'Apps and site are not initalized?!' 14 | ls -al "./sites" 15 | exit 1 16 | fi 17 | 18 | echo "Checking main containers are reachable..." 19 | if ! sudo ping -c 10 -q erpnext_db ; then 20 | echo 'Database container is not responding!' 21 | echo 'Check the following logs for details:' 22 | tail -n 100 logs/*.log 23 | exit 2 24 | fi 25 | 26 | if ! sudo ping -c 10 -q erpnext_app ; then 27 | echo 'App container is not responding!' 28 | echo 'Check the following logs for details:' 29 | tail -n 100 logs/*.log 30 | exit 4 31 | fi 32 | 33 | if ! sudo ping -c 10 -q erpnext_web ; then 34 | echo 'Web container is not responding!' 35 | echo 'Check the following logs for details:' 36 | tail -n 100 logs/*.log 37 | exit 8 38 | fi 39 | 40 | 41 | ################################################################################ 42 | # Success 43 | echo 'Docker tests successful' 44 | 45 | 46 | ################################################################################ 47 | # Automated Unit tests 48 | # https://docs.docker.com/docker-hub/builds/automated-testing/ 49 | # https://frappe.io/docs/user/en/testing 50 | ################################################################################ 51 | 52 | FRAPPE_APP_TO_TEST=recod_erpnext_design 53 | 54 | ################################################################################ 55 | # Frappe Unit tests 56 | # https://frappe.io/docs/user/en/guides/automated-testing/unit-testing 57 | 58 | FRAPPE_APP_UNIT_TEST_REPORT="$(pwd)/sites/.${FRAPPE_APP_TO_TEST}_unit_tests.xml" 59 | FRAPPE_APP_UNIT_TEST_PROFILE="$(pwd)/sites/.${FRAPPE_APP_TO_TEST}_unit_tests.prof" 60 | 61 | if [ -n "${FRAPPE_APP_TO_TEST}" ]; then 62 | 63 | echo "Preparing Frappe application '${FRAPPE_APP_TO_TEST}' tests..." 64 | 65 | bench set-config allow_tests true -g 66 | 67 | bench doctor 68 | bench enable-scheduler 69 | bench doctor 70 | 71 | #bench run-tests --help 72 | 73 | echo "Executing Unit Tests of '${FRAPPE_APP_TO_TEST}' app..." 74 | if [ "${TEST_VERSION}" = "10" ]; then 75 | bench run-tests \ 76 | --app "${FRAPPE_APP_TO_TEST}" \ 77 | --junit-xml-output "${FRAPPE_APP_UNIT_TEST_REPORT}" \ 78 | --profile > "${FRAPPE_APP_UNIT_TEST_PROFILE}" 79 | else 80 | bench run-tests \ 81 | --app "${FRAPPE_APP_TO_TEST}" \ 82 | --coverage \ 83 | --junit-xml-output "${FRAPPE_APP_UNIT_TEST_REPORT}" \ 84 | --profile > "${FRAPPE_APP_UNIT_TEST_PROFILE}" 85 | 86 | # TODO When frappe supports coverage report in XML format 87 | # https://github.com/frappe/frappe/issues/9696 88 | # --coverage-report=xml 89 | fi 90 | 91 | fi 92 | 93 | ## Check result of tests 94 | if [ -f "${FRAPPE_APP_UNIT_TEST_REPORT}" ]; then 95 | echo "Checking Frappe application '${FRAPPE_APP_TO_TEST}' unit tests report..." 96 | 97 | if grep -E '(errors|failures)="[1-9][0-9]*"' "${FRAPPE_APP_UNIT_TEST_REPORT}"; then 98 | echo "Unit Tests of '${FRAPPE_APP_TO_TEST}' app failed! See logs for details." 99 | #cat "${FRAPPE_APP_UNIT_TEST_REPORT}" 100 | exit 1 101 | else 102 | echo "Unit Tests of '${FRAPPE_APP_TO_TEST}' app successful!" 103 | #cat "${FRAPPE_APP_UNIT_TEST_REPORT}" 104 | fi 105 | fi 106 | 107 | if [ -f ./sites/.coverage ]; then 108 | set +e 109 | cp ./sites/.coverage ./.coverage 110 | 111 | echo "Unit Tests coverage report of '${FRAPPE_APP_TO_TEST}' app:" 112 | coverage report -m 113 | 114 | echo "Sending Unit Tests coverage of '${FRAPPE_APP_TO_TEST}' app to Coveralls..." 115 | coveralls -b "$(pwd)/apps/${FRAPPE_APP_TO_TEST}" -d "$(pwd)/sites/.coverage" 116 | 117 | # TODO When frappe supports coverage report in XML format 118 | # https://github.com/frappe/frappe/issues/9696 119 | #echo "Sending Unit Tests coverage of '${FRAPPE_APP_TO_TEST}' app to Codacy..." 120 | #wget -qO - https://coverage.codacy.com/get.sh | sh -s report -l Python -r "$(pwd)/sites/coverage.xml" 121 | 122 | rm ./.coverage 123 | set -e 124 | fi 125 | 126 | if [ -f "${FRAPPE_APP_UNIT_TEST_PROFILE}" ]; then 127 | echo "Checking Frappe application '${FRAPPE_APP_TO_TEST}' unit tests profile..." 128 | 129 | # XXX Are there any online services that could receive and display profiles? 130 | #cat "${FRAPPE_APP_UNIT_TEST_PROFILE}" 131 | fi 132 | 133 | 134 | ################################################################################ 135 | # TODO QUnit (JS) Unit tests 136 | # https://frappe.io/docs/user/en/guides/automated-testing/qunit-testing 137 | 138 | #bench run-ui-tests --help 139 | 140 | #echo "Executing UI Tests of '${FRAPPE_APP_TO_TEST}' app..." 141 | #if [ "${TEST_VERSION}" = "10" ] || [ "${TEST_VERSION}" = "11" ]; then 142 | # bench run-ui-tests --app ${FRAPPE_APP_TO_TEST} 143 | #else 144 | # bench run-ui-tests ${FRAPPE_APP_TO_TEST} 145 | #fi 146 | 147 | ## TODO Check result of UI tests 148 | 149 | 150 | 151 | ################################################################################ 152 | # TODO Generate docs 153 | 154 | #bench build-docs --help 155 | 156 | echo "Generating docs for '${FRAPPE_APP_TO_TEST}' app..." 157 | if [ "${TEST_VERSION}" = "10" ] || [ "${TEST_VERSION}" = "11" ]; then 158 | set +e 159 | bench build-docs \ 160 | --target "${FRAPPE_APP_TO_TEST}" \ 161 | --docs-version "${FRAPPE_APP_TO_TEST}" \ 162 | "${FRAPPE_APP_TO_TEST}" 163 | set -e 164 | else 165 | echo "Building docs is not available for this version of Frappe (${TEST_VERSION})" 166 | fi 167 | 168 | ## TODO Check docs generated properly 169 | 170 | 171 | ################################################################################ 172 | # Success 173 | echo 'Frappe app '${FRAPPE_APP_TO_TEST}' tests finished' 174 | echo 'Check the CI reports and logs for details.' 175 | exit 0 176 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | os: linux 2 | dist: bionic 3 | 4 | services: docker 5 | 6 | language: shell 7 | 8 | branches: 9 | only: 10 | - master 11 | - develop 12 | 13 | before_install: 14 | - env | sort 15 | - export TAG=travis 16 | - export VCS_REF=`git rev-parse --short HEAD` 17 | - export BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` 18 | - export IMAGE_NAME=docker-recod-erpnext-design 19 | - export home=$(pwd) 20 | - export travis_dir="${home}/.travis" 21 | - export BUILD_BRANCH=${TRAVIS_PULL_REQUEST_BRANCH:-${TRAVIS_BRANCH}} 22 | - export BUILD_URL=https://github.com/${TRAVIS_PULL_REQUEST_SLUG:-${TRAVIS_REPO_SLUG}} 23 | - export BUILD_APP=recod_erpnext_design 24 | 25 | install: 26 | - echo "Changing to travis test directory ($travis_dir)" 27 | - cd "$travis_dir" 28 | # Prepare base image for build version and variant 29 | - sed -i -e "s/%%VERSION%%/${VERSION}/g" Dockerfile.${VARIANT} 30 | - sed -i -e "s/%%IMAGE_NAME%%/${IMAGE_NAME}/g" Dockerfile.test 31 | # Test container build 32 | - travis_retry travis_wait 60 docker-compose -f docker-compose.${DATABASE}.yml build 33 | 34 | before_script: 35 | - docker images 36 | 37 | script: 38 | - echo "Changing to travis test directory ($travis_dir)" 39 | - cd "$travis_dir" 40 | # Test container run 41 | - travis_retry docker-compose -f docker-compose.${DATABASE}.yml up -d && sleep 60 42 | - docker-compose -f docker-compose.${DATABASE}.yml ps 43 | - docker-compose -f docker-compose.${DATABASE}.yml logs "erpnext_db" 44 | - docker-compose -f docker-compose.${DATABASE}.yml ps "erpnext_db" | grep "Up" || exit 1 45 | - docker-compose -f docker-compose.${DATABASE}.yml logs "erpnext_app" 46 | - docker-compose -f docker-compose.${DATABASE}.yml ps "erpnext_app" | grep "Up" || exit 1 47 | - docker-compose -f docker-compose.${DATABASE}.yml logs "erpnext_web" 48 | - docker-compose -f docker-compose.${DATABASE}.yml ps "erpnext_web" | grep "Up" || exit 1 49 | - echo 'Wait until sites and apps database installed (9-10 minutes)' && travis_wait 15 sleep 720 50 | - docker-compose -f docker-compose.${DATABASE}.yml ps 51 | - docker-compose -f docker-compose.${DATABASE}.yml logs "erpnext_db" 52 | - docker-compose -f docker-compose.${DATABASE}.yml ps "erpnext_db" | grep "Up" 53 | - docker-compose -f docker-compose.${DATABASE}.yml logs "erpnext_app" 54 | - docker-compose -f docker-compose.${DATABASE}.yml ps "erpnext_app" | grep "Up" 55 | - docker-compose -f docker-compose.${DATABASE}.yml logs "erpnext_web" 56 | - docker-compose -f docker-compose.${DATABASE}.yml ps "erpnext_web" | grep "Up" 57 | - echo 'Wait until test finished (3 minutes)' && sleep 180 58 | - docker-compose -f docker-compose.${DATABASE}.yml logs "sut" 59 | - docker-compose -f docker-compose.${DATABASE}.yml ps "sut" | grep "Exit 0" 60 | # Test container restart 61 | - docker-compose -f docker-compose.${DATABASE}.yml down 62 | - travis_retry docker-compose -f docker-compose.${DATABASE}.yml up -d && sleep 60 63 | - docker-compose -f docker-compose.${DATABASE}.yml ps 64 | - docker-compose -f docker-compose.${DATABASE}.yml logs "erpnext_db" 65 | - docker-compose -f docker-compose.${DATABASE}.yml ps "erpnext_db" | grep "Up" 66 | - docker-compose -f docker-compose.${DATABASE}.yml logs "erpnext_app" 67 | - docker-compose -f docker-compose.${DATABASE}.yml ps "erpnext_app" | grep "Up" 68 | - docker-compose -f docker-compose.${DATABASE}.yml logs "erpnext_web" 69 | - docker-compose -f docker-compose.${DATABASE}.yml ps "erpnext_web" | grep "Up" 70 | - echo 'Wait until test finished (3 minutes)' && sleep 180 71 | - docker-compose -f docker-compose.${DATABASE}.yml logs "sut" 72 | - docker-compose -f docker-compose.${DATABASE}.yml ps "sut" | grep "Exit 0" 73 | 74 | after_script: 75 | - echo "Changing to project directory ($home)" 76 | - cd "$home" 77 | - sudo pip install coverage==4.5.4 78 | - sudo pip install python-coveralls 79 | # Create same directory path as docker test execution 80 | - sudo mkdir -p '/home/frappe/frappe-bench/apps' 81 | - sudo ln -sf "$home" '/home/frappe/frappe-bench/apps/recod_erpnext_design' 82 | # Copy and convert coverage to XML format 83 | - cp '/srv/erpnext/frappe/sites/.coverage' .coverage 84 | - coverage report -m 85 | - coverage xml 86 | # Publish coverage to Coveralls 87 | - coveralls -b "$home" -d "$home/.coverage" 88 | # Publish coverage to Codacy 89 | - test -z "$CODACY_PROJECT_TOKEN" || bash <(curl -Ls https://coverage.codacy.com/get.sh) report -l Python -r "./coverage.xml" 90 | # Publish coverage to Codecov 91 | - test -z "$CODECOV_TOKEN" || bash <(curl -s https://codecov.io/bash) 92 | 93 | notifications: 94 | email: false 95 | 96 | jobs: 97 | allow_failures: 98 | - env: VERSION=develop VARIANT=alpine DATABASE=mariadb 99 | - env: VERSION=develop VARIANT=alpine DATABASE=postgres 100 | - env: VERSION=develop VARIANT=debian DATABASE=mariadb 101 | - env: VERSION=develop VARIANT=debian DATABASE=postgres 102 | - env: VERSION=develop VARIANT=debian-slim DATABASE=mariadb 103 | - env: VERSION=develop VARIANT=debian-slim DATABASE=postgres 104 | - env: VERSION=13 VARIANT=debian-slim DATABASE=postgres 105 | - env: VERSION=13 VARIANT=alpine DATABASE=mariadb 106 | - env: VERSION=13 VARIANT=alpine DATABASE=postgres 107 | - env: VERSION=13 VARIANT=debian DATABASE=mariadb 108 | - env: VERSION=13 VARIANT=debian DATABASE=postgres 109 | - env: VERSION=13 VARIANT=debian-slim DATABASE=mariadb 110 | - env: VERSION=13 VARIANT=debian-slim DATABASE=postgres 111 | # Stop supporting Frappe 10 and Python 2 112 | - env: VERSION=10 VARIANT=alpine DATABASE=mariadb 113 | - env: VERSION=10 VARIANT=debian DATABASE=mariadb 114 | - env: VERSION=10 VARIANT=debian-slim DATABASE=mariadb 115 | 116 | env: # Environments 117 | - VERSION=develop VARIANT=alpine DATABASE=mariadb 118 | - VERSION=develop VARIANT=alpine DATABASE=postgres 119 | - VERSION=develop VARIANT=debian DATABASE=mariadb 120 | - VERSION=develop VARIANT=debian DATABASE=postgres 121 | - VERSION=develop VARIANT=debian-slim DATABASE=mariadb 122 | - VERSION=develop VARIANT=debian-slim DATABASE=postgres 123 | - VERSION=10 VARIANT=alpine DATABASE=mariadb 124 | - VERSION=10 VARIANT=debian DATABASE=mariadb 125 | - VERSION=10 VARIANT=debian-slim DATABASE=mariadb 126 | - VERSION=11 VARIANT=alpine DATABASE=mariadb 127 | - VERSION=11 VARIANT=debian DATABASE=mariadb 128 | - VERSION=11 VARIANT=debian-slim DATABASE=mariadb 129 | - VERSION=12 VARIANT=alpine DATABASE=mariadb 130 | - VERSION=12 VARIANT=alpine DATABASE=postgres 131 | - VERSION=12 VARIANT=debian DATABASE=mariadb 132 | - VERSION=12 VARIANT=debian DATABASE=postgres 133 | - VERSION=12 VARIANT=debian-slim DATABASE=mariadb 134 | - VERSION=13 VARIANT=debian-slim DATABASE=postgres 135 | - VERSION=13 VARIANT=alpine DATABASE=mariadb 136 | - VERSION=13 VARIANT=alpine DATABASE=postgres 137 | - VERSION=13 VARIANT=debian DATABASE=mariadb 138 | - VERSION=13 VARIANT=debian DATABASE=postgres 139 | - VERSION=13 VARIANT=debian-slim DATABASE=mariadb 140 | - VERSION=13 VARIANT=debian-slim DATABASE=postgres 141 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | 3 | services: 4 | # https://docs.docker.com/docker-hub/builds/automated-testing/ 5 | sut: 6 | build: 7 | context: ./ 8 | dockerfile: Dockerfile.test 9 | command: sh /docker_test.sh 10 | # Only for travis-ci, do not name test container in dockerhub 11 | container_name: sut 12 | depends_on: 13 | - erpnext_db 14 | - erpnext_app 15 | - erpnext_web 16 | - erpnext_scheduler 17 | - erpnext_worker_default 18 | - erpnext_worker_long 19 | - erpnext_worker_short 20 | - erpnext_socketio 21 | - erpnext_redis_cache 22 | - erpnext_redis_queue 23 | - erpnext_redis_socketio 24 | environment: 25 | # Container setup 26 | - NODE_TYPE=test 27 | # Docker setup 28 | - DOCKER_APPS_TIMEOUT=900 29 | - DOCKER_DEBUG=1 30 | volumes_from: 31 | - erpnext_app 32 | volumes: 33 | - /etc/localtime:/etc/localtime:ro 34 | - /etc/timezone:/etc/timezone:ro 35 | 36 | erpnext_app: 37 | build: 38 | context: ./ 39 | dockerfile: Dockerfile 40 | args: 41 | - FRAPPE_APP_TO_TEST=${FRAPPE_APP_TO_TEST} 42 | image: ${IMAGE_NAME} 43 | container_name: erpnext_app 44 | command: app 45 | #restart: always 46 | ports: 47 | - 8000:8000 48 | depends_on: 49 | - erpnext_db 50 | links: 51 | - erpnext_db 52 | environment: 53 | # Docker setup 54 | - DOCKER_DB_ALLOWED_HOSTS= 55 | - DOCKER_DB_TIMEOUT=240 56 | - DOCKER_APPS_TIMEOUT=900 57 | # Frappe setup 58 | - FRAPPE_APP_INIT=frappe erpnext ${FRAPPE_APP_TO_TEST} 59 | - FRAPPE_DEFAULT_PROTOCOL=http:// 60 | - FRAPPE_DEFAULT_SITE=${ERPNEXT_SITE} 61 | - FRAPPE_LOGGING=1 62 | - DEVELOPER_MODE=1 63 | - ALLOW_TESTS=1 64 | #- Admin user setup 65 | - ADMIN_PASSWORD=${ERPNEXT_ADMIN_PWD} 66 | - ENCRYPTION_KEY=${ERPNEXT_ENCRYPTION_KEY} 67 | # Database setup 68 | - DB_TYPE=mariadb 69 | - DB_HOST=erpnext_db 70 | - DB_PORT=3306 71 | - DB_NAME=${ERPNEXT_DB_NAME} 72 | - DB_PASSWORD=${ERPNEXT_DB_PWD} 73 | - DB_ROOT_PASSWORD=${ERPNEXT_DB_ROOT_PWD} 74 | # Mail setup 75 | - MAIL_MUTED=true 76 | # Redis setup 77 | - REDIS_CACHE_HOST=erpnext_redis_cache 78 | - REDIS_QUEUE_HOST=erpnext_redis_queue 79 | - REDIS_SOCKETIO_HOST=erpnext_redis_socketio 80 | volumes: 81 | - .:/home/frappe/frappe-bench/apps/${FRAPPE_APP_TO_TEST} 82 | - ${ERPNEXT_HOME}/sites:/home/frappe/frappe-bench/sites 83 | - ${ERPNEXT_HOME}/logs:/home/frappe/frappe-bench/logs 84 | - /etc/localtime:/etc/localtime:ro 85 | - /etc/timezone:/etc/timezone:ro 86 | 87 | erpnext_web: 88 | image: nginx:alpine 89 | container_name: erpnext_web 90 | #restart: always 91 | volumes: 92 | - .travis/docker-nginx.conf:/etc/nginx/conf.d/default.conf:ro 93 | # If you need SSL connection, you can provide your own certificates 94 | # - ./certs:/etc/letsencrypt 95 | # - ./certs-data:/data/letsencrypt 96 | volumes_from: 97 | - erpnext_app 98 | depends_on: 99 | - erpnext_app 100 | ports: 101 | - 8080:80 102 | # If you need SSL connection 103 | # - '8443:443' 104 | links: 105 | - erpnext_app 106 | - erpnext_socketio 107 | 108 | erpnext_db: 109 | image: mariadb:10 110 | container_name: erpnext_db 111 | #restart: always 112 | command: --character_set_client=utf8 --bind-address=0.0.0.0 --character-set-client-handshake=FALSE --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --sql-mode="ALLOW_INVALID_DATES" 113 | environment: 114 | - MYSQL_ROOT_PASSWORD=${ERPNEXT_DB_ROOT_PWD} 115 | # Following parameters are not needed with Frappe 12 or higher since it will create DB itself 116 | - MYSQL_DATABASE=${ERPNEXT_DB_NAME} 117 | - MYSQL_USER=${ERPNEXT_DB_NAME} 118 | - MYSQL_PASSWORD=${ERPNEXT_DB_PWD} 119 | volumes: 120 | - ${ERPNEXT_HOME}/db:/var/lib/mysql 121 | - /etc/localtime:/etc/localtime:ro 122 | - /etc/timezone:/etc/timezone:ro 123 | 124 | erpnext_scheduler: 125 | #build: ./ 126 | image: ${IMAGE_NAME} 127 | container_name: erpnext_scheduler 128 | command: scheduler 129 | #restart: always 130 | depends_on: 131 | - erpnext_app 132 | environment: 133 | # Docker setup 134 | - DOCKER_APPS_TIMEOUT=900 135 | volumes: 136 | - ${ERPNEXT_HOME}/sites:/home/frappe/frappe-bench/sites 137 | - /etc/localtime:/etc/localtime:ro 138 | - /etc/timezone:/etc/timezone:ro 139 | 140 | erpnext_worker_default: 141 | #build: ./ 142 | image: ${IMAGE_NAME} 143 | container_name: erpnext_worker_default 144 | command: worker-default 145 | #restart: always 146 | depends_on: 147 | - erpnext_app 148 | environment: 149 | # Docker setup 150 | - DOCKER_APPS_TIMEOUT=900 151 | volumes: 152 | - ${ERPNEXT_HOME}/sites:/home/frappe/frappe-bench/sites 153 | - /etc/localtime:/etc/localtime:ro 154 | - /etc/timezone:/etc/timezone:ro 155 | 156 | erpnext_worker_long: 157 | #build: ./ 158 | image: ${IMAGE_NAME} 159 | container_name: erpnext_worker_long 160 | command: worker-long 161 | #restart: always 162 | depends_on: 163 | - erpnext_app 164 | environment: 165 | # Docker setup 166 | - DOCKER_APPS_TIMEOUT=900 167 | volumes: 168 | - ${ERPNEXT_HOME}/sites:/home/frappe/frappe-bench/sites 169 | - /etc/localtime:/etc/localtime:ro 170 | - /etc/timezone:/etc/timezone:ro 171 | 172 | erpnext_worker_short: 173 | #build: ./ 174 | image: ${IMAGE_NAME} 175 | container_name: erpnext_worker_short 176 | command: worker-short 177 | #restart: always 178 | depends_on: 179 | - erpnext_app 180 | environment: 181 | # Docker setup 182 | - DOCKER_APPS_TIMEOUT=900 183 | volumes: 184 | - ${ERPNEXT_HOME}/sites:/home/frappe/frappe-bench/sites 185 | - /etc/localtime:/etc/localtime:ro 186 | - /etc/timezone:/etc/timezone:ro 187 | 188 | erpnext_socketio: 189 | #build: ./ 190 | image: ${IMAGE_NAME} 191 | container_name: erpnext_socketio 192 | command: node-socketio 193 | #restart: always 194 | ports: 195 | - 3000:3000 196 | depends_on: 197 | - erpnext_app 198 | environment: 199 | # Docker setup 200 | - DOCKER_APPS_TIMEOUT=900 201 | volumes: 202 | - ${ERPNEXT_HOME}/sites:/home/frappe/frappe-bench/sites 203 | - /etc/localtime:/etc/localtime:ro 204 | - /etc/timezone:/etc/timezone:ro 205 | 206 | erpnext_redis_cache: 207 | image: redis:alpine 208 | container_name: erpnext_redis_cache 209 | #restart: always 210 | volumes: 211 | - ./services/erpnext/conf/redis_cache.conf:/etc/conf.d/redis.conf:ro 212 | command: ["redis-server","/etc/conf.d/redis.conf"] 213 | 214 | erpnext_redis_queue: 215 | image: redis:alpine 216 | container_name: erpnext_redis_queue 217 | #restart: always 218 | 219 | erpnext_redis_socketio: 220 | image: redis:alpine 221 | container_name: erpnext_redis_socketio 222 | #restart: always 223 | -------------------------------------------------------------------------------- /.travis/docker-compose.postgres.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | 3 | services: 4 | # https://docs.docker.com/docker-hub/builds/automated-testing/ 5 | sut: 6 | build: 7 | context: "" 8 | dockerfile: Dockerfile.test 9 | command: sh /docker_test.sh 10 | # Only for travis-ci, do not name test container in dockerhub 11 | container_name: sut 12 | depends_on: 13 | - erpnext_db 14 | - erpnext_app 15 | - erpnext_web 16 | - erpnext_scheduler 17 | - erpnext_worker_default 18 | - erpnext_worker_long 19 | - erpnext_worker_short 20 | - erpnext_socketio 21 | - erpnext_redis_cache 22 | - erpnext_redis_queue 23 | - erpnext_redis_socketio 24 | environment: 25 | # Container setup 26 | - NODE_TYPE=test 27 | # Docker setup 28 | - DOCKER_APPS_TIMEOUT=900 29 | - DOCKER_DEBUG=1 30 | # Test setup 31 | - TEST_VERSION=${VERSION} 32 | - TRAVIS_BUILD_ID=${TRAVIS_BUILD_ID} 33 | - TRAVIS_BUILD_NUMBER=${TRAVIS_BUILD_NUMBER} 34 | - TRAVIS_BUILD_WEB_URL=${TRAVIS_BUILD_WEB_URL} 35 | - TRAVIS_COMMIT=${TRAVIS_COMMIT} 36 | - TRAVIS_COMMIT_MESSAGE=${TRAVIS_COMMIT_MESSAGE} 37 | - TRAVIS_COMMIT_RANGE=${TRAVIS_COMMIT_RANGE} 38 | - TRAVIS_JOB_ID=${TRAVIS_JOB_ID} 39 | - TRAVIS_JOB_NAME=${TRAVIS_JOB_NAME} 40 | - TRAVIS_JOB_NUMBER=${TRAVIS_JOB_NUMBER} 41 | - TRAVIS_JOB_WEB_URL=${TRAVIS_JOB_WEB_URL} 42 | - TRAVIS_BRANCH=${TRAVIS_BRANCH} 43 | volumes_from: 44 | - erpnext_app 45 | volumes: 46 | - /etc/localtime:/etc/localtime:ro 47 | - /etc/timezone:/etc/timezone:ro 48 | 49 | erpnext_app: 50 | build: 51 | context: "" 52 | dockerfile: Dockerfile.${VARIANT} 53 | args: 54 | - BUILD_BRANCH=${BUILD_BRANCH} 55 | - BUILD_URL=${BUILD_URL} 56 | - BUILD_APP=${BUILD_APP} 57 | image: ${IMAGE_NAME} 58 | container_name: erpnext_app 59 | #restart: always 60 | ports: 61 | - 8000:8000 62 | depends_on: 63 | - erpnext_db 64 | links: 65 | - erpnext_db 66 | environment: 67 | # Container setup 68 | - NODE_TYPE=app 69 | # Frappe setup 70 | - FRAPPE_APP_INIT=erpnext recod_erpnext_design 71 | - FRAPPE_DEFAULT_PROTOCOL=http:// 72 | - FRAPPE_DEFAULT_SITE=${ERPNEXT_SITE} 73 | - FRAPPE_LOGGING=1 74 | - DEVELOPER_MODE=0 75 | - ALLOW_TESTS=1 76 | #- Admin user setup 77 | - ADMIN_PASSWORD=${ERPNEXT_ADMIN_PWD} 78 | - ENCRYPTION_KEY=${ERPNEXT_ENCRYPTION_KEY} 79 | # Database setup 80 | - DB_TYPE=postgres 81 | - DB_HOST=erpnext_db 82 | - DB_PORT=5432 83 | - DB_NAME=${ERPNEXT_DB_NAME} 84 | - DB_PASSWORD=${ERPNEXT_DB_PWD} 85 | - DB_ROOT_LOGIN=${ERPNEXT_DB_ROOT_LOGIN} 86 | - DB_ROOT_PASSWORD=${ERPNEXT_DB_ROOT_PWD} 87 | # Mail setup 88 | - MAIL_MUTED=true 89 | # Redis setup 90 | - REDIS_CACHE_HOST=erpnext_redis_cache 91 | - REDIS_QUEUE_HOST=erpnext_redis_queue 92 | - REDIS_SOCKETIO_HOST=erpnext_redis_socketio 93 | volumes: 94 | - /srv/erpnext/frappe/sites:/home/frappe/frappe-bench/sites 95 | - /srv/erpnext/frappe/logs:/home/frappe/frappe-bench/logs 96 | - /etc/localtime:/etc/localtime:ro 97 | - /etc/timezone:/etc/timezone:ro 98 | 99 | erpnext_web: 100 | image: nginx:alpine 101 | container_name: erpnext_web 102 | #restart: always 103 | volumes: 104 | - ./docker-nginx.conf:/etc/nginx/conf.d/default.conf:ro 105 | # If you need SSL connection, you can provide your own certificates 106 | # - ./certs:/etc/letsencrypt 107 | # - ./certs-data:/data/letsencrypt 108 | volumes_from: 109 | - erpnext_app 110 | depends_on: 111 | - erpnext_app 112 | ports: 113 | - 80:80 114 | # If you need SSL connection 115 | # - '443:443' 116 | links: 117 | - erpnext_app 118 | - erpnext_socketio 119 | 120 | erpnext_db: 121 | image: postgres:10-alpine 122 | container_name: erpnext_db 123 | #restart: always 124 | stdin_open: true 125 | tty: true 126 | command: postgres -c 'max_connections=500' 127 | environment: 128 | - POSTGRES_USER=${ERPNEXT_DB_ROOT_LOGIN} 129 | - POSTGRES_PASSWORD=${ERPNEXT_DB_ROOT_PWD} 130 | volumes: 131 | - /srv/erpnext/db/data:/var/lib/postgresql/data 132 | - /etc/localtime:/etc/localtime:ro 133 | - /etc/timezone:/etc/timezone:ro 134 | 135 | erpnext_scheduler: 136 | #build: ./ 137 | image: ${IMAGE_NAME} 138 | container_name: erpnext_scheduler 139 | #restart: always 140 | depends_on: 141 | - erpnext_app 142 | environment: 143 | - NODE_TYPE=scheduler 144 | # Docker setup 145 | - DOCKER_APPS_TIMEOUT=900 146 | volumes: 147 | - /srv/erpnext/frappe/sites:/home/frappe/frappe-bench/sites 148 | - /etc/localtime:/etc/localtime:ro 149 | - /etc/timezone:/etc/timezone:ro 150 | 151 | erpnext_worker_default: 152 | #build: ./ 153 | image: ${IMAGE_NAME} 154 | container_name: erpnext_worker_default 155 | #restart: always 156 | depends_on: 157 | - erpnext_app 158 | environment: 159 | - NODE_TYPE=worker-default 160 | # Docker setup 161 | - DOCKER_APPS_TIMEOUT=900 162 | volumes: 163 | - /srv/erpnext/frappe/sites:/home/frappe/frappe-bench/sites 164 | - /etc/localtime:/etc/localtime:ro 165 | - /etc/timezone:/etc/timezone:ro 166 | 167 | erpnext_worker_long: 168 | #build: ./ 169 | image: ${IMAGE_NAME} 170 | container_name: erpnext_worker_long 171 | #restart: always 172 | depends_on: 173 | - erpnext_app 174 | environment: 175 | - NODE_TYPE=worker-long 176 | # Docker setup 177 | - DOCKER_APPS_TIMEOUT=900 178 | volumes: 179 | - /srv/erpnext/frappe/sites:/home/frappe/frappe-bench/sites 180 | - /etc/localtime:/etc/localtime:ro 181 | - /etc/timezone:/etc/timezone:ro 182 | 183 | erpnext_worker_short: 184 | #build: ./ 185 | image: ${IMAGE_NAME} 186 | container_name: erpnext_worker_short 187 | #restart: always 188 | depends_on: 189 | - erpnext_app 190 | environment: 191 | - NODE_TYPE=worker-short 192 | # Docker setup 193 | - DOCKER_APPS_TIMEOUT=900 194 | volumes: 195 | - /srv/erpnext/frappe/sites:/home/frappe/frappe-bench/sites 196 | - /etc/localtime:/etc/localtime:ro 197 | - /etc/timezone:/etc/timezone:ro 198 | 199 | erpnext_socketio: 200 | #build: ./ 201 | image: ${IMAGE_NAME} 202 | container_name: erpnext_socketio 203 | #restart: always 204 | ports: 205 | - 3000:3000 206 | depends_on: 207 | - erpnext_app 208 | environment: 209 | - NODE_TYPE=node-socketio 210 | # Docker setup 211 | - DOCKER_APPS_TIMEOUT=900 212 | volumes: 213 | - /srv/erpnext/frappe/sites:/home/frappe/frappe-bench/sites 214 | - /etc/localtime:/etc/localtime:ro 215 | - /etc/timezone:/etc/timezone:ro 216 | 217 | erpnext_redis_cache: 218 | image: redis:alpine 219 | container_name: erpnext_redis_cache 220 | #restart: always 221 | volumes: 222 | - ./services/erpnext/conf/redis_cache.conf:/etc/conf.d/redis.conf:ro 223 | command: ["redis-server","/etc/conf.d/redis.conf"] 224 | 225 | erpnext_redis_queue: 226 | image: redis:alpine 227 | container_name: erpnext_redis_queue 228 | #restart: always 229 | 230 | erpnext_redis_socketio: 231 | image: redis:alpine 232 | container_name: erpnext_redis_socketio 233 | #restart: always 234 | -------------------------------------------------------------------------------- /.travis/docker-compose.mariadb.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | 3 | services: 4 | # https://docs.docker.com/docker-hub/builds/automated-testing/ 5 | sut: 6 | build: 7 | context: "" 8 | dockerfile: Dockerfile.test 9 | command: sh /docker_test.sh 10 | # Only for travis-ci, do not name test container in dockerhub 11 | container_name: sut 12 | depends_on: 13 | - erpnext_db 14 | - erpnext_app 15 | - erpnext_web 16 | - erpnext_scheduler 17 | - erpnext_worker_default 18 | - erpnext_worker_long 19 | - erpnext_worker_short 20 | - erpnext_socketio 21 | - erpnext_redis_cache 22 | - erpnext_redis_queue 23 | - erpnext_redis_socketio 24 | environment: 25 | # Container setup 26 | - NODE_TYPE=test 27 | # Docker setup 28 | - DOCKER_APPS_TIMEOUT=900 29 | - DOCKER_DEBUG=1 30 | # Test setup 31 | - TEST_VERSION=${VERSION} 32 | - TRAVIS_BUILD_ID=${TRAVIS_BUILD_ID} 33 | - TRAVIS_BUILD_NUMBER=${TRAVIS_BUILD_NUMBER} 34 | - TRAVIS_BUILD_WEB_URL=${TRAVIS_BUILD_WEB_URL} 35 | - TRAVIS_COMMIT=${TRAVIS_COMMIT} 36 | - TRAVIS_COMMIT_MESSAGE=${TRAVIS_COMMIT_MESSAGE} 37 | - TRAVIS_COMMIT_RANGE=${TRAVIS_COMMIT_RANGE} 38 | - TRAVIS_JOB_ID=${TRAVIS_JOB_ID} 39 | - TRAVIS_JOB_NAME=${TRAVIS_JOB_NAME} 40 | - TRAVIS_JOB_NUMBER=${TRAVIS_JOB_NUMBER} 41 | - TRAVIS_JOB_WEB_URL=${TRAVIS_JOB_WEB_URL} 42 | - TRAVIS_BRANCH=${TRAVIS_BRANCH} 43 | volumes_from: 44 | - erpnext_app 45 | volumes: 46 | - /etc/localtime:/etc/localtime:ro 47 | - /etc/timezone:/etc/timezone:ro 48 | 49 | erpnext_app: 50 | build: 51 | context: "" 52 | dockerfile: Dockerfile.${VARIANT} 53 | args: 54 | - BUILD_BRANCH=${BUILD_BRANCH} 55 | - BUILD_URL=${BUILD_URL} 56 | - BUILD_APP=${BUILD_APP} 57 | image: ${IMAGE_NAME} 58 | container_name: erpnext_app 59 | command: app 60 | #restart: always 61 | ports: 62 | - 8000:8000 63 | depends_on: 64 | - erpnext_db 65 | links: 66 | - erpnext_db 67 | environment: 68 | # Docker setup 69 | - DOCKER_DB_ALLOWED_HOSTS= 70 | - DOCKER_APPS_TIMEOUT=900 71 | # Frappe setup 72 | - FRAPPE_APP_INIT=erpnext recod_erpnext_design 73 | - FRAPPE_DEFAULT_PROTOCOL=http:// 74 | - FRAPPE_DEFAULT_SITE=${ERPNEXT_SITE} 75 | - FRAPPE_LOGGING=1 76 | - DEVELOPER_MODE=0 77 | - ALLOW_TESTS=1 78 | #- Admin user setup 79 | - ADMIN_PASSWORD=${ERPNEXT_ADMIN_PWD} 80 | - ENCRYPTION_KEY=${ERPNEXT_ENCRYPTION_KEY} 81 | # Database setup 82 | - DB_TYPE=mariadb 83 | - DB_HOST=erpnext_db 84 | - DB_PORT=3306 85 | - DB_NAME=${ERPNEXT_DB_NAME} 86 | - DB_PASSWORD=${ERPNEXT_DB_PWD} 87 | - DB_ROOT_PASSWORD=${ERPNEXT_DB_ROOT_PWD} 88 | # Mail setup 89 | - MAIL_MUTED=true 90 | # Redis setup 91 | - REDIS_CACHE_HOST=erpnext_redis_cache 92 | - REDIS_QUEUE_HOST=erpnext_redis_queue 93 | - REDIS_SOCKETIO_HOST=erpnext_redis_socketio 94 | volumes: 95 | - /srv/erpnext/frappe/sites:/home/frappe/frappe-bench/sites 96 | - /srv/erpnext/frappe/logs:/home/frappe/frappe-bench/logs 97 | - /etc/localtime:/etc/localtime:ro 98 | - /etc/timezone:/etc/timezone:ro 99 | 100 | erpnext_web: 101 | image: nginx:alpine 102 | container_name: erpnext_web 103 | #restart: always 104 | volumes: 105 | - ./docker-nginx.conf:/etc/nginx/conf.d/default.conf:ro 106 | # If you need SSL connection, you can provide your own certificates 107 | # - ./certs:/etc/letsencrypt 108 | # - ./certs-data:/data/letsencrypt 109 | volumes_from: 110 | - erpnext_app 111 | depends_on: 112 | - erpnext_app 113 | ports: 114 | - 80:80 115 | # If you need SSL connection 116 | # - '443:443' 117 | links: 118 | - erpnext_app 119 | - erpnext_socketio 120 | 121 | erpnext_db: 122 | image: mariadb:10 123 | container_name: erpnext_db 124 | #restart: always 125 | command: --character_set_client=utf8 --bind-address=0.0.0.0 --character-set-client-handshake=FALSE --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --sql-mode="ALLOW_INVALID_DATES" 126 | environment: 127 | - MYSQL_ROOT_PASSWORD=${ERPNEXT_DB_ROOT_PWD} 128 | # Following parameters are not needed with Frappe 12 or higher since it will create DB itself 129 | - MYSQL_DATABASE=${ERPNEXT_DB_NAME} 130 | - MYSQL_USER=${ERPNEXT_DB_NAME} 131 | - MYSQL_PASSWORD=${ERPNEXT_DB_PWD} 132 | volumes: 133 | - /srv/erpnext/db:/var/lib/mysql 134 | - /etc/localtime:/etc/localtime:ro 135 | - /etc/timezone:/etc/timezone:ro 136 | 137 | erpnext_scheduler: 138 | #build: ./ 139 | image: ${IMAGE_NAME} 140 | container_name: erpnext_scheduler 141 | command: scheduler 142 | #restart: always 143 | depends_on: 144 | - erpnext_app 145 | environment: 146 | # Docker setup 147 | - DOCKER_APPS_TIMEOUT=900 148 | volumes: 149 | - /srv/erpnext/frappe/sites:/home/frappe/frappe-bench/sites 150 | - /etc/localtime:/etc/localtime:ro 151 | - /etc/timezone:/etc/timezone:ro 152 | 153 | erpnext_worker_default: 154 | #build: ./ 155 | image: ${IMAGE_NAME} 156 | container_name: erpnext_worker_default 157 | command: worker-default 158 | #restart: always 159 | depends_on: 160 | - erpnext_app 161 | environment: 162 | # Docker setup 163 | - DOCKER_APPS_TIMEOUT=900 164 | volumes: 165 | - /srv/erpnext/frappe/sites:/home/frappe/frappe-bench/sites 166 | - /etc/localtime:/etc/localtime:ro 167 | - /etc/timezone:/etc/timezone:ro 168 | 169 | erpnext_worker_long: 170 | #build: ./ 171 | image: ${IMAGE_NAME} 172 | container_name: erpnext_worker_long 173 | command: worker-long 174 | #restart: always 175 | depends_on: 176 | - erpnext_app 177 | environment: 178 | # Docker setup 179 | - DOCKER_APPS_TIMEOUT=900 180 | volumes: 181 | - /srv/erpnext/frappe/sites:/home/frappe/frappe-bench/sites 182 | - /etc/localtime:/etc/localtime:ro 183 | - /etc/timezone:/etc/timezone:ro 184 | 185 | erpnext_worker_short: 186 | #build: ./ 187 | image: ${IMAGE_NAME} 188 | container_name: erpnext_worker_short 189 | command: worker-short 190 | #restart: always 191 | depends_on: 192 | - erpnext_app 193 | environment: 194 | # Docker setup 195 | - DOCKER_APPS_TIMEOUT=900 196 | volumes: 197 | - /srv/erpnext/frappe/sites:/home/frappe/frappe-bench/sites 198 | - /etc/localtime:/etc/localtime:ro 199 | - /etc/timezone:/etc/timezone:ro 200 | 201 | erpnext_socketio: 202 | #build: ./ 203 | image: ${IMAGE_NAME} 204 | container_name: erpnext_socketio 205 | command: node-socketio 206 | #restart: always 207 | ports: 208 | - 3000:3000 209 | depends_on: 210 | - erpnext_app 211 | environment: 212 | # Docker setup 213 | - DOCKER_APPS_TIMEOUT=900 214 | volumes: 215 | - /srv/erpnext/frappe/sites:/home/frappe/frappe-bench/sites 216 | - /etc/localtime:/etc/localtime:ro 217 | - /etc/timezone:/etc/timezone:ro 218 | 219 | erpnext_redis_cache: 220 | image: redis:alpine 221 | container_name: erpnext_redis_cache 222 | #restart: always 223 | volumes: 224 | - ./services/erpnext/conf/redis_cache.conf:/etc/conf.d/redis.conf:ro 225 | command: ["redis-server","/etc/conf.d/redis.conf"] 226 | 227 | erpnext_redis_queue: 228 | image: redis:alpine 229 | container_name: erpnext_redis_queue 230 | #restart: always 231 | 232 | erpnext_redis_socketio: 233 | image: redis:alpine 234 | container_name: erpnext_redis_socketio 235 | #restart: always 236 | -------------------------------------------------------------------------------- /recod_erpnext_design/fixtures/terms_and_conditions.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "disabled": 0, 4 | "docstatus": 0, 5 | "doctype": "Terms and Conditions", 6 | "modified": "2020-06-15 09:31:43.710267", 7 | "name": "Payment 20/30/50 by bank transfer", 8 | "parent": null, 9 | "parentfield": null, 10 | "parenttype": null, 11 | "terms": "

{{_(\"Terms and Conditions\")}}

{{_(\"20% before starting, 30% middle, 50% at the end\")}}
{% set links=frappe.get_all('Bank Account', filters={'company': company, 'is_default': 1}, fields=['company', 'bank', 'iban', 'bank_account_no', 'branch_code', 'swift_number'] ) %}{% if links %}{% set bank_account=links[0] %}{% if bank_account %}{{_(\"Payment by transfer to the following bank account:\")}}{% if bank_account.company %}
{{bank_account.company}}
{% endif %}{% if bank_account.bank %}
{{bank_account.bank}}
{% endif %}{% if bank_account.iban %}
{{bank_account.iban}}
{% endif %}{% if bank_account.bank_account_no %}
{{bank_account.bank_account_no}}
{% endif %}{% if bank_account.branch_code %}
{{bank_account.branch_code}}
{% endif %}{% if bank_account.swift_number %}
{{bank_account.swift_number}}
{% endif %}{% endif %}{% endif %}", 12 | "title": "Payment 20/30/50 by bank transfer" 13 | }, 14 | { 15 | "disabled": 0, 16 | "docstatus": 0, 17 | "doctype": "Terms and Conditions", 18 | "modified": "2020-06-15 09:31:12.018637", 19 | "name": "Payment on due date by bank transfer", 20 | "parent": null, 21 | "parentfield": null, 22 | "parenttype": null, 23 | "terms": "

{{_(\"Terms and Conditions\")}}

{{_(\"on due date\")}}
{% set links=frappe.get_all('Bank Account', filters={'company': company, 'is_default': 1}, fields=['company', 'bank', 'iban', 'bank_account_no', 'branch_code', 'swift_number'] ) %}{% if links %}{% set bank_account=links[0] %}{% if bank_account %}{{_(\"Payment by transfer to the following bank account:\")}}{% if bank_account.company %}
{{bank_account.company}}
{% endif %}{% if bank_account.bank %}
{{bank_account.bank}}
{% endif %}{% if bank_account.iban %}
{{bank_account.iban}}
{% endif %}{% if bank_account.bank_account_no %}
{{bank_account.bank_account_no}}
{% endif %}{% if bank_account.branch_code %}
{{bank_account.branch_code}}
{% endif %}{% if bank_account.swift_number %}
{{bank_account.swift_number}}
{% endif %}{% endif %}{% endif %}", 24 | "title": "Payment on due date by bank transfer" 25 | }, 26 | { 27 | "disabled": 0, 28 | "docstatus": 0, 29 | "doctype": "Terms and Conditions", 30 | "modified": "2020-06-15 09:30:50.908299", 31 | "name": "Payment on delivery by bank transfer", 32 | "parent": null, 33 | "parentfield": null, 34 | "parenttype": null, 35 | "terms": "

{{_(\"Terms and Conditions\")}}

{{_(\"on delivery\")}}
{% set links=frappe.get_all('Bank Account', filters={'company': company, 'is_default': 1}, fields=['company', 'bank', 'iban', 'bank_account_no', 'branch_code', 'swift_number'] ) %}{% if links %}{% set bank_account=links[0] %}{% if bank_account %}{{_(\"Payment by transfer to the following bank account:\")}}{% if bank_account.company %}
{{bank_account.company}}
{% endif %}{% if bank_account.bank %}
{{bank_account.bank}}
{% endif %}{% if bank_account.iban %}
{{bank_account.iban}}
{% endif %}{% if bank_account.bank_account_no %}
{{bank_account.bank_account_no}}
{% endif %}{% if bank_account.branch_code %}
{{bank_account.branch_code}}
{% endif %}{% if bank_account.swift_number %}
{{bank_account.swift_number}}
{% endif %}{% endif %}{% endif %}", 36 | "title": "Payment on delivery by bank transfer" 37 | }, 38 | { 39 | "disabled": 0, 40 | "docstatus": 0, 41 | "doctype": "Terms and Conditions", 42 | "modified": "2020-06-15 09:29:57.436782", 43 | "name": "Payment on receipt by bank transfer", 44 | "parent": null, 45 | "parentfield": null, 46 | "parenttype": null, 47 | "terms": "

{{_(\"Terms and Conditions\")}}

{{_(\"on receipt\")}}
{% set links=frappe.get_all('Bank Account', filters={'company': company, 'is_default': 1}, fields=['company', 'bank', 'iban', 'bank_account_no', 'branch_code', 'swift_number'] ) %}{% if links %}{% set bank_account=links[0] %}{% if bank_account %}{{_(\"Payment by transfer to the following bank account:\")}}{% if bank_account.company %}
{{bank_account.company}}
{% endif %}{% if bank_account.bank %}
{{bank_account.bank}}
{% endif %}{% if bank_account.iban %}
{{bank_account.iban}}
{% endif %}{% if bank_account.bank_account_no %}
{{bank_account.bank_account_no}}
{% endif %}{% if bank_account.branch_code %}
{{bank_account.branch_code}}
{% endif %}{% if bank_account.swift_number %}
{{bank_account.swift_number}}
{% endif %}{% endif %}{% endif %}", 48 | "title": "Payment on receipt by bank transfer" 49 | } 50 | ] -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU AFFERO GENERAL PUBLIC LICENSE 2 | Version 3, 19 November 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU Affero General Public License is a free, copyleft license for 11 | software and other kinds of works, specifically designed to ensure 12 | cooperation with the community in the case of network server software. 13 | 14 | The licenses for most software and other practical works are designed 15 | to take away your freedom to share and change the works. By contrast, 16 | our General Public Licenses are intended to guarantee your freedom to 17 | share and change all versions of a program--to make sure it remains free 18 | software for all its users. 19 | 20 | When we speak of free software, we are referring to freedom, not 21 | price. Our General Public Licenses are designed to make sure that you 22 | have the freedom to distribute copies of free software (and charge for 23 | them if you wish), that you receive source code or can get it if you 24 | want it, that you can change the software or use pieces of it in new 25 | free programs, and that you know you can do these things. 26 | 27 | Developers that use our General Public Licenses protect your rights 28 | with two steps: (1) assert copyright on the software, and (2) offer 29 | you this License which gives you legal permission to copy, distribute 30 | and/or modify the software. 31 | 32 | A secondary benefit of defending all users' freedom is that 33 | improvements made in alternate versions of the program, if they 34 | receive widespread use, become available for other developers to 35 | incorporate. Many developers of free software are heartened and 36 | encouraged by the resulting cooperation. However, in the case of 37 | software used on network servers, this result may fail to come about. 38 | The GNU General Public License permits making a modified version and 39 | letting the public access it on a server without ever releasing its 40 | source code to the public. 41 | 42 | The GNU Affero General Public License is designed specifically to 43 | ensure that, in such cases, the modified source code becomes available 44 | to the community. It requires the operator of a network server to 45 | provide the source code of the modified version running there to the 46 | users of that server. Therefore, public use of a modified version, on 47 | a publicly accessible server, gives the public access to the source 48 | code of the modified version. 49 | 50 | An older license, called the Affero General Public License and 51 | published by Affero, was designed to accomplish similar goals. This is 52 | a different license, not a version of the Affero GPL, but Affero has 53 | released a new version of the Affero GPL which permits relicensing under 54 | this license. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | TERMS AND CONDITIONS 60 | 61 | 0. Definitions. 62 | 63 | "This License" refers to version 3 of the GNU Affero General Public License. 64 | 65 | "Copyright" also means copyright-like laws that apply to other kinds of 66 | works, such as semiconductor masks. 67 | 68 | "The Program" refers to any copyrightable work licensed under this 69 | License. Each licensee is addressed as "you". "Licensees" and 70 | "recipients" may be individuals or organizations. 71 | 72 | To "modify" a work means to copy from or adapt all or part of the work 73 | in a fashion requiring copyright permission, other than the making of an 74 | exact copy. The resulting work is called a "modified version" of the 75 | earlier work or a work "based on" the earlier work. 76 | 77 | A "covered work" means either the unmodified Program or a work based 78 | on the Program. 79 | 80 | To "propagate" a work means to do anything with it that, without 81 | permission, would make you directly or secondarily liable for 82 | infringement under applicable copyright law, except executing it on a 83 | computer or modifying a private copy. Propagation includes copying, 84 | distribution (with or without modification), making available to the 85 | public, and in some countries other activities as well. 86 | 87 | To "convey" a work means any kind of propagation that enables other 88 | parties to make or receive copies. Mere interaction with a user through 89 | a computer network, with no transfer of a copy, is not conveying. 90 | 91 | An interactive user interface displays "Appropriate Legal Notices" 92 | to the extent that it includes a convenient and prominently visible 93 | feature that (1) displays an appropriate copyright notice, and (2) 94 | tells the user that there is no warranty for the work (except to the 95 | extent that warranties are provided), that licensees may convey the 96 | work under this License, and how to view a copy of this License. If 97 | the interface presents a list of user commands or options, such as a 98 | menu, a prominent item in the list meets this criterion. 99 | 100 | 1. Source Code. 101 | 102 | The "source code" for a work means the preferred form of the work 103 | for making modifications to it. "Object code" means any non-source 104 | form of a work. 105 | 106 | A "Standard Interface" means an interface that either is an official 107 | standard defined by a recognized standards body, or, in the case of 108 | interfaces specified for a particular programming language, one that 109 | is widely used among developers working in that language. 110 | 111 | The "System Libraries" of an executable work include anything, other 112 | than the work as a whole, that (a) is included in the normal form of 113 | packaging a Major Component, but which is not part of that Major 114 | Component, and (b) serves only to enable use of the work with that 115 | Major Component, or to implement a Standard Interface for which an 116 | implementation is available to the public in source code form. A 117 | "Major Component", in this context, means a major essential component 118 | (kernel, window system, and so on) of the specific operating system 119 | (if any) on which the executable work runs, or a compiler used to 120 | produce the work, or an object code interpreter used to run it. 121 | 122 | The "Corresponding Source" for a work in object code form means all 123 | the source code needed to generate, install, and (for an executable 124 | work) run the object code and to modify the work, including scripts to 125 | control those activities. However, it does not include the work's 126 | System Libraries, or general-purpose tools or generally available free 127 | programs which are used unmodified in performing those activities but 128 | which are not part of the work. For example, Corresponding Source 129 | includes interface definition files associated with source files for 130 | the work, and the source code for shared libraries and dynamically 131 | linked subprograms that the work is specifically designed to require, 132 | such as by intimate data communication or control flow between those 133 | subprograms and other parts of the work. 134 | 135 | The Corresponding Source need not include anything that users 136 | can regenerate automatically from other parts of the Corresponding 137 | Source. 138 | 139 | The Corresponding Source for a work in source code form is that 140 | same work. 141 | 142 | 2. Basic Permissions. 143 | 144 | All rights granted under this License are granted for the term of 145 | copyright on the Program, and are irrevocable provided the stated 146 | conditions are met. This License explicitly affirms your unlimited 147 | permission to run the unmodified Program. The output from running a 148 | covered work is covered by this License only if the output, given its 149 | content, constitutes a covered work. This License acknowledges your 150 | rights of fair use or other equivalent, as provided by copyright law. 151 | 152 | You may make, run and propagate covered works that you do not 153 | convey, without conditions so long as your license otherwise remains 154 | in force. You may convey covered works to others for the sole purpose 155 | of having them make modifications exclusively for you, or provide you 156 | with facilities for running those works, provided that you comply with 157 | the terms of this License in conveying all material for which you do 158 | not control copyright. Those thus making or running the covered works 159 | for you must do so exclusively on your behalf, under your direction 160 | and control, on terms that prohibit them from making any copies of 161 | your copyrighted material outside their relationship with you. 162 | 163 | Conveying under any other circumstances is permitted solely under 164 | the conditions stated below. Sublicensing is not allowed; section 10 165 | makes it unnecessary. 166 | 167 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 168 | 169 | No covered work shall be deemed part of an effective technological 170 | measure under any applicable law fulfilling obligations under article 171 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 172 | similar laws prohibiting or restricting circumvention of such 173 | measures. 174 | 175 | When you convey a covered work, you waive any legal power to forbid 176 | circumvention of technological measures to the extent such circumvention 177 | is effected by exercising rights under this License with respect to 178 | the covered work, and you disclaim any intention to limit operation or 179 | modification of the work as a means of enforcing, against the work's 180 | users, your or third parties' legal rights to forbid circumvention of 181 | technological measures. 182 | 183 | 4. Conveying Verbatim Copies. 184 | 185 | You may convey verbatim copies of the Program's source code as you 186 | receive it, in any medium, provided that you conspicuously and 187 | appropriately publish on each copy an appropriate copyright notice; 188 | keep intact all notices stating that this License and any 189 | non-permissive terms added in accord with section 7 apply to the code; 190 | keep intact all notices of the absence of any warranty; and give all 191 | recipients a copy of this License along with the Program. 192 | 193 | You may charge any price or no price for each copy that you convey, 194 | and you may offer support or warranty protection for a fee. 195 | 196 | 5. Conveying Modified Source Versions. 197 | 198 | You may convey a work based on the Program, or the modifications to 199 | produce it from the Program, in the form of source code under the 200 | terms of section 4, provided that you also meet all of these conditions: 201 | 202 | a) The work must carry prominent notices stating that you modified 203 | it, and giving a relevant date. 204 | 205 | b) The work must carry prominent notices stating that it is 206 | released under this License and any conditions added under section 207 | 7. This requirement modifies the requirement in section 4 to 208 | "keep intact all notices". 209 | 210 | c) You must license the entire work, as a whole, under this 211 | License to anyone who comes into possession of a copy. This 212 | License will therefore apply, along with any applicable section 7 213 | additional terms, to the whole of the work, and all its parts, 214 | regardless of how they are packaged. This License gives no 215 | permission to license the work in any other way, but it does not 216 | invalidate such permission if you have separately received it. 217 | 218 | d) If the work has interactive user interfaces, each must display 219 | Appropriate Legal Notices; however, if the Program has interactive 220 | interfaces that do not display Appropriate Legal Notices, your 221 | work need not make them do so. 222 | 223 | A compilation of a covered work with other separate and independent 224 | works, which are not by their nature extensions of the covered work, 225 | and which are not combined with it such as to form a larger program, 226 | in or on a volume of a storage or distribution medium, is called an 227 | "aggregate" if the compilation and its resulting copyright are not 228 | used to limit the access or legal rights of the compilation's users 229 | beyond what the individual works permit. Inclusion of a covered work 230 | in an aggregate does not cause this License to apply to the other 231 | parts of the aggregate. 232 | 233 | 6. Conveying Non-Source Forms. 234 | 235 | You may convey a covered work in object code form under the terms 236 | of sections 4 and 5, provided that you also convey the 237 | machine-readable Corresponding Source under the terms of this License, 238 | in one of these ways: 239 | 240 | a) Convey the object code in, or embodied in, a physical product 241 | (including a physical distribution medium), accompanied by the 242 | Corresponding Source fixed on a durable physical medium 243 | customarily used for software interchange. 244 | 245 | b) Convey the object code in, or embodied in, a physical product 246 | (including a physical distribution medium), accompanied by a 247 | written offer, valid for at least three years and valid for as 248 | long as you offer spare parts or customer support for that product 249 | model, to give anyone who possesses the object code either (1) a 250 | copy of the Corresponding Source for all the software in the 251 | product that is covered by this License, on a durable physical 252 | medium customarily used for software interchange, for a price no 253 | more than your reasonable cost of physically performing this 254 | conveying of source, or (2) access to copy the 255 | Corresponding Source from a network server at no charge. 256 | 257 | c) Convey individual copies of the object code with a copy of the 258 | written offer to provide the Corresponding Source. This 259 | alternative is allowed only occasionally and noncommercially, and 260 | only if you received the object code with such an offer, in accord 261 | with subsection 6b. 262 | 263 | d) Convey the object code by offering access from a designated 264 | place (gratis or for a charge), and offer equivalent access to the 265 | Corresponding Source in the same way through the same place at no 266 | further charge. You need not require recipients to copy the 267 | Corresponding Source along with the object code. If the place to 268 | copy the object code is a network server, the Corresponding Source 269 | may be on a different server (operated by you or a third party) 270 | that supports equivalent copying facilities, provided you maintain 271 | clear directions next to the object code saying where to find the 272 | Corresponding Source. Regardless of what server hosts the 273 | Corresponding Source, you remain obligated to ensure that it is 274 | available for as long as needed to satisfy these requirements. 275 | 276 | e) Convey the object code using peer-to-peer transmission, provided 277 | you inform other peers where the object code and Corresponding 278 | Source of the work are being offered to the general public at no 279 | charge under subsection 6d. 280 | 281 | A separable portion of the object code, whose source code is excluded 282 | from the Corresponding Source as a System Library, need not be 283 | included in conveying the object code work. 284 | 285 | A "User Product" is either (1) a "consumer product", which means any 286 | tangible personal property which is normally used for personal, family, 287 | or household purposes, or (2) anything designed or sold for incorporation 288 | into a dwelling. In determining whether a product is a consumer product, 289 | doubtful cases shall be resolved in favor of coverage. For a particular 290 | product received by a particular user, "normally used" refers to a 291 | typical or common use of that class of product, regardless of the status 292 | of the particular user or of the way in which the particular user 293 | actually uses, or expects or is expected to use, the product. A product 294 | is a consumer product regardless of whether the product has substantial 295 | commercial, industrial or non-consumer uses, unless such uses represent 296 | the only significant mode of use of the product. 297 | 298 | "Installation Information" for a User Product means any methods, 299 | procedures, authorization keys, or other information required to install 300 | and execute modified versions of a covered work in that User Product from 301 | a modified version of its Corresponding Source. The information must 302 | suffice to ensure that the continued functioning of the modified object 303 | code is in no case prevented or interfered with solely because 304 | modification has been made. 305 | 306 | If you convey an object code work under this section in, or with, or 307 | specifically for use in, a User Product, and the conveying occurs as 308 | part of a transaction in which the right of possession and use of the 309 | User Product is transferred to the recipient in perpetuity or for a 310 | fixed term (regardless of how the transaction is characterized), the 311 | Corresponding Source conveyed under this section must be accompanied 312 | by the Installation Information. But this requirement does not apply 313 | if neither you nor any third party retains the ability to install 314 | modified object code on the User Product (for example, the work has 315 | been installed in ROM). 316 | 317 | The requirement to provide Installation Information does not include a 318 | requirement to continue to provide support service, warranty, or updates 319 | for a work that has been modified or installed by the recipient, or for 320 | the User Product in which it has been modified or installed. Access to a 321 | network may be denied when the modification itself materially and 322 | adversely affects the operation of the network or violates the rules and 323 | protocols for communication across the network. 324 | 325 | Corresponding Source conveyed, and Installation Information provided, 326 | in accord with this section must be in a format that is publicly 327 | documented (and with an implementation available to the public in 328 | source code form), and must require no special password or key for 329 | unpacking, reading or copying. 330 | 331 | 7. Additional Terms. 332 | 333 | "Additional permissions" are terms that supplement the terms of this 334 | License by making exceptions from one or more of its conditions. 335 | Additional permissions that are applicable to the entire Program shall 336 | be treated as though they were included in this License, to the extent 337 | that they are valid under applicable law. If additional permissions 338 | apply only to part of the Program, that part may be used separately 339 | under those permissions, but the entire Program remains governed by 340 | this License without regard to the additional permissions. 341 | 342 | When you convey a copy of a covered work, you may at your option 343 | remove any additional permissions from that copy, or from any part of 344 | it. (Additional permissions may be written to require their own 345 | removal in certain cases when you modify the work.) You may place 346 | additional permissions on material, added by you to a covered work, 347 | for which you have or can give appropriate copyright permission. 348 | 349 | Notwithstanding any other provision of this License, for material you 350 | add to a covered work, you may (if authorized by the copyright holders of 351 | that material) supplement the terms of this License with terms: 352 | 353 | a) Disclaiming warranty or limiting liability differently from the 354 | terms of sections 15 and 16 of this License; or 355 | 356 | b) Requiring preservation of specified reasonable legal notices or 357 | author attributions in that material or in the Appropriate Legal 358 | Notices displayed by works containing it; or 359 | 360 | c) Prohibiting misrepresentation of the origin of that material, or 361 | requiring that modified versions of such material be marked in 362 | reasonable ways as different from the original version; or 363 | 364 | d) Limiting the use for publicity purposes of names of licensors or 365 | authors of the material; or 366 | 367 | e) Declining to grant rights under trademark law for use of some 368 | trade names, trademarks, or service marks; or 369 | 370 | f) Requiring indemnification of licensors and authors of that 371 | material by anyone who conveys the material (or modified versions of 372 | it) with contractual assumptions of liability to the recipient, for 373 | any liability that these contractual assumptions directly impose on 374 | those licensors and authors. 375 | 376 | All other non-permissive additional terms are considered "further 377 | restrictions" within the meaning of section 10. If the Program as you 378 | received it, or any part of it, contains a notice stating that it is 379 | governed by this License along with a term that is a further 380 | restriction, you may remove that term. If a license document contains 381 | a further restriction but permits relicensing or conveying under this 382 | License, you may add to a covered work material governed by the terms 383 | of that license document, provided that the further restriction does 384 | not survive such relicensing or conveying. 385 | 386 | If you add terms to a covered work in accord with this section, you 387 | must place, in the relevant source files, a statement of the 388 | additional terms that apply to those files, or a notice indicating 389 | where to find the applicable terms. 390 | 391 | Additional terms, permissive or non-permissive, may be stated in the 392 | form of a separately written license, or stated as exceptions; 393 | the above requirements apply either way. 394 | 395 | 8. Termination. 396 | 397 | You may not propagate or modify a covered work except as expressly 398 | provided under this License. Any attempt otherwise to propagate or 399 | modify it is void, and will automatically terminate your rights under 400 | this License (including any patent licenses granted under the third 401 | paragraph of section 11). 402 | 403 | However, if you cease all violation of this License, then your 404 | license from a particular copyright holder is reinstated (a) 405 | provisionally, unless and until the copyright holder explicitly and 406 | finally terminates your license, and (b) permanently, if the copyright 407 | holder fails to notify you of the violation by some reasonable means 408 | prior to 60 days after the cessation. 409 | 410 | Moreover, your license from a particular copyright holder is 411 | reinstated permanently if the copyright holder notifies you of the 412 | violation by some reasonable means, this is the first time you have 413 | received notice of violation of this License (for any work) from that 414 | copyright holder, and you cure the violation prior to 30 days after 415 | your receipt of the notice. 416 | 417 | Termination of your rights under this section does not terminate the 418 | licenses of parties who have received copies or rights from you under 419 | this License. If your rights have been terminated and not permanently 420 | reinstated, you do not qualify to receive new licenses for the same 421 | material under section 10. 422 | 423 | 9. Acceptance Not Required for Having Copies. 424 | 425 | You are not required to accept this License in order to receive or 426 | run a copy of the Program. Ancillary propagation of a covered work 427 | occurring solely as a consequence of using peer-to-peer transmission 428 | to receive a copy likewise does not require acceptance. However, 429 | nothing other than this License grants you permission to propagate or 430 | modify any covered work. These actions infringe copyright if you do 431 | not accept this License. Therefore, by modifying or propagating a 432 | covered work, you indicate your acceptance of this License to do so. 433 | 434 | 10. Automatic Licensing of Downstream Recipients. 435 | 436 | Each time you convey a covered work, the recipient automatically 437 | receives a license from the original licensors, to run, modify and 438 | propagate that work, subject to this License. You are not responsible 439 | for enforcing compliance by third parties with this License. 440 | 441 | An "entity transaction" is a transaction transferring control of an 442 | organization, or substantially all assets of one, or subdividing an 443 | organization, or merging organizations. If propagation of a covered 444 | work results from an entity transaction, each party to that 445 | transaction who receives a copy of the work also receives whatever 446 | licenses to the work the party's predecessor in interest had or could 447 | give under the previous paragraph, plus a right to possession of the 448 | Corresponding Source of the work from the predecessor in interest, if 449 | the predecessor has it or can get it with reasonable efforts. 450 | 451 | You may not impose any further restrictions on the exercise of the 452 | rights granted or affirmed under this License. For example, you may 453 | not impose a license fee, royalty, or other charge for exercise of 454 | rights granted under this License, and you may not initiate litigation 455 | (including a cross-claim or counterclaim in a lawsuit) alleging that 456 | any patent claim is infringed by making, using, selling, offering for 457 | sale, or importing the Program or any portion of it. 458 | 459 | 11. Patents. 460 | 461 | A "contributor" is a copyright holder who authorizes use under this 462 | License of the Program or a work on which the Program is based. The 463 | work thus licensed is called the contributor's "contributor version". 464 | 465 | A contributor's "essential patent claims" are all patent claims 466 | owned or controlled by the contributor, whether already acquired or 467 | hereafter acquired, that would be infringed by some manner, permitted 468 | by this License, of making, using, or selling its contributor version, 469 | but do not include claims that would be infringed only as a 470 | consequence of further modification of the contributor version. For 471 | purposes of this definition, "control" includes the right to grant 472 | patent sublicenses in a manner consistent with the requirements of 473 | this License. 474 | 475 | Each contributor grants you a non-exclusive, worldwide, royalty-free 476 | patent license under the contributor's essential patent claims, to 477 | make, use, sell, offer for sale, import and otherwise run, modify and 478 | propagate the contents of its contributor version. 479 | 480 | In the following three paragraphs, a "patent license" is any express 481 | agreement or commitment, however denominated, not to enforce a patent 482 | (such as an express permission to practice a patent or covenant not to 483 | sue for patent infringement). To "grant" such a patent license to a 484 | party means to make such an agreement or commitment not to enforce a 485 | patent against the party. 486 | 487 | If you convey a covered work, knowingly relying on a patent license, 488 | and the Corresponding Source of the work is not available for anyone 489 | to copy, free of charge and under the terms of this License, through a 490 | publicly available network server or other readily accessible means, 491 | then you must either (1) cause the Corresponding Source to be so 492 | available, or (2) arrange to deprive yourself of the benefit of the 493 | patent license for this particular work, or (3) arrange, in a manner 494 | consistent with the requirements of this License, to extend the patent 495 | license to downstream recipients. "Knowingly relying" means you have 496 | actual knowledge that, but for the patent license, your conveying the 497 | covered work in a country, or your recipient's use of the covered work 498 | in a country, would infringe one or more identifiable patents in that 499 | country that you have reason to believe are valid. 500 | 501 | If, pursuant to or in connection with a single transaction or 502 | arrangement, you convey, or propagate by procuring conveyance of, a 503 | covered work, and grant a patent license to some of the parties 504 | receiving the covered work authorizing them to use, propagate, modify 505 | or convey a specific copy of the covered work, then the patent license 506 | you grant is automatically extended to all recipients of the covered 507 | work and works based on it. 508 | 509 | A patent license is "discriminatory" if it does not include within 510 | the scope of its coverage, prohibits the exercise of, or is 511 | conditioned on the non-exercise of one or more of the rights that are 512 | specifically granted under this License. You may not convey a covered 513 | work if you are a party to an arrangement with a third party that is 514 | in the business of distributing software, under which you make payment 515 | to the third party based on the extent of your activity of conveying 516 | the work, and under which the third party grants, to any of the 517 | parties who would receive the covered work from you, a discriminatory 518 | patent license (a) in connection with copies of the covered work 519 | conveyed by you (or copies made from those copies), or (b) primarily 520 | for and in connection with specific products or compilations that 521 | contain the covered work, unless you entered into that arrangement, 522 | or that patent license was granted, prior to 28 March 2007. 523 | 524 | Nothing in this License shall be construed as excluding or limiting 525 | any implied license or other defenses to infringement that may 526 | otherwise be available to you under applicable patent law. 527 | 528 | 12. No Surrender of Others' Freedom. 529 | 530 | If conditions are imposed on you (whether by court order, agreement or 531 | otherwise) that contradict the conditions of this License, they do not 532 | excuse you from the conditions of this License. If you cannot convey a 533 | covered work so as to satisfy simultaneously your obligations under this 534 | License and any other pertinent obligations, then as a consequence you may 535 | not convey it at all. For example, if you agree to terms that obligate you 536 | to collect a royalty for further conveying from those to whom you convey 537 | the Program, the only way you could satisfy both those terms and this 538 | License would be to refrain entirely from conveying the Program. 539 | 540 | 13. Remote Network Interaction; Use with the GNU General Public License. 541 | 542 | Notwithstanding any other provision of this License, if you modify the 543 | Program, your modified version must prominently offer all users 544 | interacting with it remotely through a computer network (if your version 545 | supports such interaction) an opportunity to receive the Corresponding 546 | Source of your version by providing access to the Corresponding Source 547 | from a network server at no charge, through some standard or customary 548 | means of facilitating copying of software. This Corresponding Source 549 | shall include the Corresponding Source for any work covered by version 3 550 | of the GNU General Public License that is incorporated pursuant to the 551 | following paragraph. 552 | 553 | Notwithstanding any other provision of this License, you have 554 | permission to link or combine any covered work with a work licensed 555 | under version 3 of the GNU General Public License into a single 556 | combined work, and to convey the resulting work. The terms of this 557 | License will continue to apply to the part which is the covered work, 558 | but the work with which it is combined will remain governed by version 559 | 3 of the GNU General Public License. 560 | 561 | 14. Revised Versions of this License. 562 | 563 | The Free Software Foundation may publish revised and/or new versions of 564 | the GNU Affero General Public License from time to time. Such new versions 565 | will be similar in spirit to the present version, but may differ in detail to 566 | address new problems or concerns. 567 | 568 | Each version is given a distinguishing version number. If the 569 | Program specifies that a certain numbered version of the GNU Affero General 570 | Public License "or any later version" applies to it, you have the 571 | option of following the terms and conditions either of that numbered 572 | version or of any later version published by the Free Software 573 | Foundation. If the Program does not specify a version number of the 574 | GNU Affero General Public License, you may choose any version ever published 575 | by the Free Software Foundation. 576 | 577 | If the Program specifies that a proxy can decide which future 578 | versions of the GNU Affero General Public License can be used, that proxy's 579 | public statement of acceptance of a version permanently authorizes you 580 | to choose that version for the Program. 581 | 582 | Later license versions may give you additional or different 583 | permissions. However, no additional obligations are imposed on any 584 | author or copyright holder as a result of your choosing to follow a 585 | later version. 586 | 587 | 15. Disclaimer of Warranty. 588 | 589 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 590 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 591 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 592 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 593 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 594 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 595 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 596 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 597 | 598 | 16. Limitation of Liability. 599 | 600 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 601 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 602 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 603 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 604 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 605 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 606 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 607 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 608 | SUCH DAMAGES. 609 | 610 | 17. Interpretation of Sections 15 and 16. 611 | 612 | If the disclaimer of warranty and limitation of liability provided 613 | above cannot be given local legal effect according to their terms, 614 | reviewing courts shall apply local law that most closely approximates 615 | an absolute waiver of all civil liability in connection with the 616 | Program, unless a warranty or assumption of liability accompanies a 617 | copy of the Program in return for a fee. 618 | 619 | END OF TERMS AND CONDITIONS 620 | 621 | How to Apply These Terms to Your New Programs 622 | 623 | If you develop a new program, and you want it to be of the greatest 624 | possible use to the public, the best way to achieve this is to make it 625 | free software which everyone can redistribute and change under these terms. 626 | 627 | To do so, attach the following notices to the program. It is safest 628 | to attach them to the start of each source file to most effectively 629 | state the exclusion of warranty; and each file should have at least 630 | the "copyright" line and a pointer to where the full notice is found. 631 | 632 | 633 | Copyright (C) 634 | 635 | This program is free software: you can redistribute it and/or modify 636 | it under the terms of the GNU Affero General Public License as published 637 | by the Free Software Foundation, either version 3 of the License, or 638 | (at your option) any later version. 639 | 640 | This program is distributed in the hope that it will be useful, 641 | but WITHOUT ANY WARRANTY; without even the implied warranty of 642 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 643 | GNU Affero General Public License for more details. 644 | 645 | You should have received a copy of the GNU Affero General Public License 646 | along with this program. If not, see . 647 | 648 | Also add information on how to contact you by electronic and paper mail. 649 | 650 | If your software can interact with users remotely through a computer 651 | network, you should also make sure that it provides a way for users to 652 | get its source. For example, if your program is a web application, its 653 | interface could display a "Source" link that leads users to an archive 654 | of the code. There are many ways you could offer source, and different 655 | solutions will be better for different programs; see section 13 for the 656 | specific requirements. 657 | 658 | You should also get your employer (if you work as a programmer) or school, 659 | if any, to sign a "copyright disclaimer" for the program, if necessary. 660 | For more information on this, and how to apply and follow the GNU AGPL, see 661 | . --------------------------------------------------------------------------------