[tryton-commits] changeset in modules/purchase:default Test long_description usin...

2020-12-15 Thread David Harper
changeset 2fbafe138815 in modules/purchase:default
details: https://hg.tryton.org/modules/purchase?cmd=changeset;node=2fbafe138815
description:
Test long_description using twine check

issue9781
review337181002
diffstat:

 .drone.yml |  6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r 4eca8fbe9c77 -r 2fbafe138815 .drone.yml
--- a/.drone.ymlFri Dec 11 13:51:52 2020 +0100
+++ b/.drone.ymlTue Dec 15 11:42:56 2020 +
@@ -23,6 +23,12 @@
 - tox -e "${TOXENV}-${DATABASE}"
 volumes:
 - cache:/root/.cache
+check_dist:
+image: ${IMAGE}
+commands:
+- pip install twine
+- python setup.py sdist
+- twine check dist/*
 
 services:
 postgresql:



[tryton-commits] changeset in modules/project_invoice:default Test long_descripti...

2020-12-15 Thread David Harper
changeset a6d1d694e67b in modules/project_invoice:default
details: 
https://hg.tryton.org/modules/project_invoice?cmd=changeset;node=a6d1d694e67b
description:
Test long_description using twine check

issue9781
review337181002
diffstat:

 .drone.yml |  6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r 12161198a976 -r a6d1d694e67b .drone.yml
--- a/.drone.ymlFri Dec 11 13:51:52 2020 +0100
+++ b/.drone.ymlTue Dec 15 11:42:56 2020 +
@@ -23,6 +23,12 @@
 - tox -e "${TOXENV}-${DATABASE}"
 volumes:
 - cache:/root/.cache
+check_dist:
+image: ${IMAGE}
+commands:
+- pip install twine
+- python setup.py sdist
+- twine check dist/*
 
 services:
 postgresql:



[tryton-commits] changeset in modules/purchase_requisition:default Test long_desc...

2020-12-15 Thread David Harper
changeset b7d107204be3 in modules/purchase_requisition:default
details: 
https://hg.tryton.org/modules/purchase_requisition?cmd=changeset;node=b7d107204be3
description:
Test long_description using twine check

issue9781
review337181002
diffstat:

 .drone.yml |  6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r b6453b8c01ad -r b7d107204be3 .drone.yml
--- a/.drone.ymlFri Dec 11 13:51:53 2020 +0100
+++ b/.drone.ymlTue Dec 15 11:42:56 2020 +
@@ -23,6 +23,12 @@
 - tox -e "${TOXENV}-${DATABASE}"
 volumes:
 - cache:/root/.cache
+check_dist:
+image: ${IMAGE}
+commands:
+- pip install twine
+- python setup.py sdist
+- twine check dist/*
 
 services:
 postgresql:



[tryton-commits] changeset in modules/purchase_secondary_unit:default Test long_d...

2020-12-15 Thread David Harper
changeset eca6f7fb2f28 in modules/purchase_secondary_unit:default
details: 
https://hg.tryton.org/modules/purchase_secondary_unit?cmd=changeset;node=eca6f7fb2f28
description:
Test long_description using twine check

issue9781
review337181002
diffstat:

 .drone.yml |  6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r 71a67d8b2a2f -r eca6f7fb2f28 .drone.yml
--- a/.drone.ymlFri Dec 11 13:51:53 2020 +0100
+++ b/.drone.ymlTue Dec 15 11:42:56 2020 +
@@ -23,6 +23,12 @@
 - tox -e "${TOXENV}-${DATABASE}"
 volumes:
 - cache:/root/.cache
+check_dist:
+image: ${IMAGE}
+commands:
+- pip install twine
+- python setup.py sdist
+- twine check dist/*
 
 services:
 postgresql:



[tryton-commits] changeset in modules/purchase_request_quotation:default Test lon...

2020-12-15 Thread David Harper
changeset d29e49d97fbb in modules/purchase_request_quotation:default
details: 
https://hg.tryton.org/modules/purchase_request_quotation?cmd=changeset;node=d29e49d97fbb
description:
Test long_description using twine check

issue9781
review337181002
diffstat:

 .drone.yml |  6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r cb37b9f13969 -r d29e49d97fbb .drone.yml
--- a/.drone.ymlFri Dec 11 13:51:53 2020 +0100
+++ b/.drone.ymlTue Dec 15 11:42:56 2020 +
@@ -23,6 +23,12 @@
 - tox -e "${TOXENV}-${DATABASE}"
 volumes:
 - cache:/root/.cache
+check_dist:
+image: ${IMAGE}
+commands:
+- pip install twine
+- python setup.py sdist
+- twine check dist/*
 
 services:
 postgresql:



[tryton-commits] changeset in modules/purchase_request:default Test long_descript...

2020-12-15 Thread David Harper
changeset 4c26ed37ef15 in modules/purchase_request:default
details: 
https://hg.tryton.org/modules/purchase_request?cmd=changeset;node=4c26ed37ef15
description:
Test long_description using twine check

issue9781
review337181002
diffstat:

 .drone.yml |  6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r d9c23d5133a0 -r 4c26ed37ef15 .drone.yml
--- a/.drone.ymlFri Dec 11 13:51:53 2020 +0100
+++ b/.drone.ymlTue Dec 15 11:42:56 2020 +
@@ -23,6 +23,12 @@
 - tox -e "${TOXENV}-${DATABASE}"
 volumes:
 - cache:/root/.cache
+check_dist:
+image: ${IMAGE}
+commands:
+- pip install twine
+- python setup.py sdist
+- twine check dist/*
 
 services:
 postgresql:



[tryton-commits] changeset in modules/sale_advance_payment:default Test long_desc...

2020-12-15 Thread David Harper
changeset a482cd558a50 in modules/sale_advance_payment:default
details: 
https://hg.tryton.org/modules/sale_advance_payment?cmd=changeset;node=a482cd558a50
description:
Test long_description using twine check

issue9781
review337181002
diffstat:

 .drone.yml |  6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r 218392d4f163 -r a482cd558a50 .drone.yml
--- a/.drone.ymlFri Dec 11 13:51:53 2020 +0100
+++ b/.drone.ymlTue Dec 15 11:42:56 2020 +
@@ -23,6 +23,12 @@
 - tox -e "${TOXENV}-${DATABASE}"
 volumes:
 - cache:/root/.cache
+check_dist:
+image: ${IMAGE}
+commands:
+- pip install twine
+- python setup.py sdist
+- twine check dist/*
 
 services:
 postgresql:



[tryton-commits] changeset in modules/sale:default Test long_description using tw...

2020-12-15 Thread David Harper
changeset fec977a66580 in modules/sale:default
details: https://hg.tryton.org/modules/sale?cmd=changeset;node=fec977a66580
description:
Test long_description using twine check

issue9781
review337181002
diffstat:

 .drone.yml |  6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r e17479f9560c -r fec977a66580 .drone.yml
--- a/.drone.ymlFri Dec 11 13:51:53 2020 +0100
+++ b/.drone.ymlTue Dec 15 11:42:56 2020 +
@@ -23,6 +23,12 @@
 - tox -e "${TOXENV}-${DATABASE}"
 volumes:
 - cache:/root/.cache
+check_dist:
+image: ${IMAGE}
+commands:
+- pip install twine
+- python setup.py sdist
+- twine check dist/*
 
 services:
 postgresql:



[tryton-commits] changeset in modules/sale_amendment:default Test long_descriptio...

2020-12-15 Thread David Harper
changeset d0c51e612b4f in modules/sale_amendment:default
details: 
https://hg.tryton.org/modules/sale_amendment?cmd=changeset;node=d0c51e612b4f
description:
Test long_description using twine check

issue9781
review337181002
diffstat:

 .drone.yml |  6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r e642c7b9ea91 -r d0c51e612b4f .drone.yml
--- a/.drone.ymlFri Dec 11 13:51:53 2020 +0100
+++ b/.drone.ymlTue Dec 15 11:42:56 2020 +
@@ -23,6 +23,12 @@
 - tox -e "${TOXENV}-${DATABASE}"
 volumes:
 - cache:/root/.cache
+check_dist:
+image: ${IMAGE}
+commands:
+- pip install twine
+- python setup.py sdist
+- twine check dist/*
 
 services:
 postgresql:



[tryton-commits] changeset in modules/purchase_shipment_cost:default Test long_de...

2020-12-15 Thread David Harper
changeset 2ffe1f12cf83 in modules/purchase_shipment_cost:default
details: 
https://hg.tryton.org/modules/purchase_shipment_cost?cmd=changeset;node=2ffe1f12cf83
description:
Test long_description using twine check

issue9781
review337181002
diffstat:

 .drone.yml |  6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r ba714fa83858 -r 2ffe1f12cf83 .drone.yml
--- a/.drone.ymlFri Dec 11 13:51:53 2020 +0100
+++ b/.drone.ymlTue Dec 15 11:42:56 2020 +
@@ -23,6 +23,12 @@
 - tox -e "${TOXENV}-${DATABASE}"
 volumes:
 - cache:/root/.cache
+check_dist:
+image: ${IMAGE}
+commands:
+- pip install twine
+- python setup.py sdist
+- twine check dist/*
 
 services:
 postgresql:



[tryton-commits] changeset in modules/purchase_invoice_line_standalone:default Te...

2020-12-15 Thread David Harper
changeset ca996ef138f9 in modules/purchase_invoice_line_standalone:default
details: 
https://hg.tryton.org/modules/purchase_invoice_line_standalone?cmd=changeset;node=ca996ef138f9
description:
Test long_description using twine check

issue9781
review337181002
diffstat:

 .drone.yml |  6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r c68d67ae9cb1 -r ca996ef138f9 .drone.yml
--- a/.drone.ymlFri Dec 11 13:51:53 2020 +0100
+++ b/.drone.ymlTue Dec 15 11:42:56 2020 +
@@ -23,6 +23,12 @@
 - tox -e "${TOXENV}-${DATABASE}"
 volumes:
 - cache:/root/.cache
+check_dist:
+image: ${IMAGE}
+commands:
+- pip install twine
+- python setup.py sdist
+- twine check dist/*
 
 services:
 postgresql:



[tryton-commits] changeset in cookiecutter:default Graft doc directory into sourc...

2020-12-22 Thread David Harper
changeset d5c89a0fa160 in cookiecutter:default
details: https://hg.tryton.org/cookiecutter?cmd=changeset;node=d5c89a0fa160
description:
Graft doc directory into source distribution

issue9945
review339271003
diffstat:

 {{ cookiecutter.module_name }}/MANIFEST.in |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (9 lines):

diff -r 4aa8c1fca788 -r d5c89a0fa160 {{ cookiecutter.module_name }}/MANIFEST.in
--- a/{{ cookiecutter.module_name }}/MANIFEST.inSat Dec 19 17:07:58 
2020 +0100
+++ b/{{ cookiecutter.module_name }}/MANIFEST.inTue Dec 22 19:30:17 
2020 +
@@ -2,4 +2,4 @@
 include COPYRIGHT
 include LICENSE
 include README.rst
-include doc/*
+graft doc



[tryton-commits] changeset in www.tryton.org:default Add documentation style guide

2020-12-30 Thread David Harper
changeset 671443acd8a0 in www.tryton.org:default
details: https://hg.tryton.org/www.tryton.org?cmd=changeset;node=671443acd8a0
description:
Add documentation style guide

issue9636
review300511003
diffstat:

 app.py  |   28 +++
 static/images/banner-document-400.jpg   |  Bin 
 static/images/banner-document-800.jpg   |  Bin 
 static/images/banner-document.jpg   |  Bin 
 templates/develop.html  |   58 ++-
 templates/guidelines/code.html  |   74 +
 templates/guidelines/documentation.html |  238 
 templates/guidelines/help.html  |  130 +
 templates/guidelines/howto.html |   90 
 9 files changed, 576 insertions(+), 42 deletions(-)

diffs (677 lines):

diff -r 66a9b14309ac -r 671443acd8a0 app.py
--- a/app.pyTue Dec 22 22:42:38 2020 +0100
+++ b/app.pyWed Dec 30 16:04:36 2020 +
@@ -635,6 +635,34 @@
 return render_template('develop.html')
 
 
+@app.route('/develop/guidelines/code')
+@cache.cached(key_prefix=cache_key_prefix_view)
+@add_links(PRECONNECT_HEADERS + JS_LINK_HEADERS + CSS_LINK_HEADERS)
+def guidelines_code():
+return render_template('guidelines/code.html')
+
+
+@app.route('/develop/guidelines/documentation')
+@cache.cached(key_prefix=cache_key_prefix_view)
+@add_links(PRECONNECT_HEADERS + JS_LINK_HEADERS + CSS_LINK_HEADERS)
+def guidelines_documentation():
+return render_template('guidelines/documentation.html')
+
+
+@app.route('/develop/guidelines/help-text')
+@cache.cached(key_prefix=cache_key_prefix_view)
+@add_links(PRECONNECT_HEADERS + JS_LINK_HEADERS + CSS_LINK_HEADERS)
+def guidelines_documentation_help():
+return render_template('guidelines/help.html')
+
+
+@app.route('/develop/guidelines/howto')
+@cache.cached(key_prefix=cache_key_prefix_view)
+@add_links(PRECONNECT_HEADERS + JS_LINK_HEADERS + CSS_LINK_HEADERS)
+def guidelines_documentation_howto():
+return render_template('guidelines/howto.html')
+
+
 @app.route('/foundation')
 @cache.cached(key_prefix=cache_key_prefix_view)
 @add_links(PRECONNECT_HEADERS + JS_LINK_HEADERS + CSS_LINK_HEADERS)
diff -r 66a9b14309ac -r 671443acd8a0 static/images/banner-document-400.jpg
Binary file static/images/banner-document-400.jpg has changed
diff -r 66a9b14309ac -r 671443acd8a0 static/images/banner-document-800.jpg
Binary file static/images/banner-document-800.jpg has changed
diff -r 66a9b14309ac -r 671443acd8a0 static/images/banner-document.jpg
Binary file static/images/banner-document.jpg has changed
diff -r 66a9b14309ac -r 671443acd8a0 templates/develop.html
--- a/templates/develop.htmlTue Dec 22 22:42:38 2020 +0100
+++ b/templates/develop.htmlWed Dec 30 16:04:36 2020 +
@@ -4,9 +4,9 @@
 {% set toc = [
 ("Report an Issue", 'report-issue', None),
 ("Submit a Change", 'submit-change', None),
-("Coding Guidelines", 'coding-guidelines', [
-("Code Style", 'code-style', None),
-("Best Practices", 'best-practices', None),
+("Guidelines", 'guidelines', [
+("Code", 'guidelines-code', None),
+("Documentation", 'guidelines-documentation', None),
 ]),
 ("Requirements", 'requirements', None),
 ("Rules", 'rules', None),
@@ -61,7 +61,7 @@
 
 Submit a Change
 
-Follow the coding guidelines.
+Follow the guidelines.
 Submit your change to our https://codereview.tryton.org/;>review tool using the https://codereview.tryton.org/static/upload.py;>upload.py script (see 
the https://github.com/rietveld-codereview/rietveld/wiki;>help 
page).
 Make sure the review has the repository name at the start of the 
review title,
 and ensure the review description contains a reference to the 
issue (e.g.: issue1234).
@@ -78,47 +78,21 @@
 
 
 
-Coding Guidelines
-The Tryton Project strongly recommends the following guidelines.
-Code Style
-Python
-Code style, in general, follows https://www.python.org/dev/peps/pep-0008/;>PEP 8:
-
-Use 4 spaces for indentation.
-Avoid the usage of from M import 
*.
-If unsure about conformity use https://pypi.org/project/flake8/;>flake8 to check the code (with 
option ignore=E123,E124,E126,E128,E741,W503).
-Breaking lines:
-
-Use 4 spaces per bracket pair.
-Prefer parenthesis over backslash.
-
-
-
-XML
+Guidelines
+The Tryton Project has guidelines for both code and documentation.
+Code
 
-Use 4 spaces for indentation.
-No 80 columns limitation.
-Opening tag on single line or one attribute per line.
+The Coding 
Guidelines should be followed for any review you submit.
 
-Best Practices
-
-Use doc-strings and comments in your code.
-Never pass keyword arguments as positional arguments when calling 
a method.
-In the very 

[tryton-commits] changeset in modules/country:default Improve documentation

2020-12-30 Thread David Harper
changeset 0a79e3d9bc2a in modules/country:default
details: https://hg.tryton.org/modules/country?cmd=changeset;node=0a79e3d9bc2a
description:
Improve documentation

issue9598
review312311002
diffstat:

 doc/conf.py|  61 ++
 doc/design.rst |  53 ++
 doc/index.rst  |  41 +-
 doc/setup.rst  |  39 +
 doc/usage.rst  |  13 
 setup.py   |   7 -
 6 files changed, 181 insertions(+), 33 deletions(-)

diffs (258 lines):

diff -r bcff300599a0 -r 0a79e3d9bc2a doc/conf.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/doc/conf.py   Wed Dec 30 16:28:18 2020 +
@@ -0,0 +1,61 @@
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
+
+modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/'
+trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/'
+
+
+def get_info():
+import configparser
+import os
+import subprocess
+import sys
+
+module_dir = os.path.dirname(os.path.dirname(__file__))
+
+config = configparser.ConfigParser()
+config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
+info = dict(config.items('tryton'))
+
+result = subprocess.run(
+[sys.executable, 'setup.py', '--name'],
+stdout=subprocess.PIPE, check=True, cwd=module_dir)
+info['name'] = result.stdout.decode('utf-8').strip()
+
+result = subprocess.run(
+[sys.executable, 'setup.py', '--version'],
+stdout=subprocess.PIPE, check=True, cwd=module_dir)
+version = result.stdout.decode('utf-8').strip()
+if 'dev' in version:
+info['series'] = 'latest'
+else:
+info['series'] = '.'.join(version.split('.', 2)[:2])
+
+for key in {'depends', 'extras_depend'}:
+info[key] = info.get(key, '').strip().splitlines()
+info['modules'] = set(info['depends'] + info['extras_depend'])
+info['modules'] -= {'ir', 'res'}
+
+return info
+
+
+info = get_info()
+
+master_doc = 'index'
+project = info['name']
+release = version = info['series']
+default_role = 'ref'
+highlight_language = 'none'
+extensions = [
+'sphinx.ext.intersphinx',
+]
+intersphinx_mapping = {
+'trytond': (trytond_url.format(series=version), None),
+}
+intersphinx_mapping.update({
+m: (modules_url.format(
+module=m.replace('_', '-'), series=version), None)
+for m in info['modules']
+})
+
+del get_info, info, modules_url, trytond_url
diff -r bcff300599a0 -r 0a79e3d9bc2a doc/design.rst
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/doc/design.rstWed Dec 30 16:28:18 2020 +
@@ -0,0 +1,53 @@
+**
+Design
+**
+
+The *Country Module* introduces the following concepts:
+
+.. _model-country.country:
+
+Country
+===
+
+This is the top level concept provided by the *Country Module*.
+Each country record in Tryton represents a specific country, political state
+or nation.
+
+The ISO 3166 standard defines the codes and names of countries and is used when
+`Loading and updating countries and subdivisions`.
+
+.. seealso::
+
+   Countries can be found under the main menu entry:
+
+  |Administration --> Countries|__
+
+  .. |Administration --> Countries| replace:: 
:menuselection:`Administration --> Countries`
+  __ https://demo.tryton.org/model/country.country
+
+.. _model-country.subdivision:
+
+Subdivision
+===
+
+The *Subdivision* of a `Country ` represents a well
+defined area of that country.
+Subdivisions can be any size, ranging from regions, provinces, states, and
+counties down to municipalities, cities and boroughs.
+
+The ISO 3166-2 standard defines codes and names for country subdivisions.
+These are automatically loaded and updated along with the countries.
+
+.. _model-country.zip:
+
+Zip
+===
+
+The *Zip* concept is used to store postal codes, and their relationship to
+`Countries `, `Subdivisions `
+and cities.
+Depending on the country they relate to these codes are known locally as
+either postcodes, post codes, :abbr:`PIN (Postal Index Number)` or
+:abbr:`ZIP (Zone Improvement Plan)` codes.
+
+A script is provided for `loading and updating postal codes`.
diff -r bcff300599a0 -r 0a79e3d9bc2a doc/index.rst
--- a/doc/index.rst Sat Dec 19 17:08:45 2020 +0100
+++ b/doc/index.rst Wed Dec 30 16:28:18 2020 +
@@ -1,36 +1,15 @@
+##
 Country Module
 ##
 
-The country module defines the concepts of country and subdivision and
-comes preloaded with the ISO 3166 list of countries and subdivisions
-thanks to the pycountry module.
-
-
-Country
-***
-
-A country is defined by the full name of the country, a code (the ISO
-country code made of two chars) and the list of subdivisions.
-
-
-Subdivision

[tryton-commits] changeset in cookiecutter:default Add documentation template files

2021-01-05 Thread David Harper
changeset db2eea93e83d in cookiecutter:default
details: https://hg.tryton.org/cookiecutter?cmd=changeset;node=db2eea93e83d
description:
Add documentation template files

issue9636
review339291002
diffstat:

 {{ cookiecutter.module_name }}/doc/conf.py|  61 +++
 {{ cookiecutter.module_name }}/doc/design.rst |   3 +
 {{ cookiecutter.module_name }}/doc/index.rst  |   7 +++
 {{ cookiecutter.module_name }}/doc/usage.rst  |   3 +
 {{ cookiecutter.module_name }}/setup.py   |   2 +-
 5 files changed, 75 insertions(+), 1 deletions(-)

diffs (104 lines):

diff -r d5c89a0fa160 -r db2eea93e83d {{ cookiecutter.module_name }}/doc/conf.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/{{ cookiecutter.module_name }}/doc/conf.pyTue Jan 05 16:34:35 
2021 +
@@ -0,0 +1,61 @@
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
+
+modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/'
+trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/'
+
+
+def get_info():
+import configparser
+import os
+import subprocess
+import sys
+
+module_dir = os.path.dirname(os.path.dirname(__file__))
+
+config = configparser.ConfigParser()
+config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
+info = dict(config.items('tryton'))
+
+result = subprocess.run(
+[sys.executable, 'setup.py', '--name'],
+stdout=subprocess.PIPE, check=True, cwd=module_dir)
+info['name'] = result.stdout.decode('utf-8').strip()
+
+result = subprocess.run(
+[sys.executable, 'setup.py', '--version'],
+stdout=subprocess.PIPE, check=True, cwd=module_dir)
+version = result.stdout.decode('utf-8').strip()
+if 'dev' in version:
+info['series'] = 'latest'
+else:
+info['series'] = '.'.join(version.split('.', 2)[:2])
+
+for key in {'depends', 'extras_depend'}:
+info[key] = info.get(key, '').strip().splitlines()
+info['modules'] = set(info['depends'] + info['extras_depend'])
+info['modules'] -= {'ir', 'res'}
+
+return info
+
+
+info = get_info()
+
+master_doc = 'index'
+project = info['name']
+release = version = info['series']
+default_role = 'ref'
+highlight_language = 'none'
+extensions = [
+'sphinx.ext.intersphinx',
+]
+intersphinx_mapping = {
+'trytond': (trytond_url.format(series=version), None),
+}
+intersphinx_mapping.update({
+m: (modules_url.format(
+module=m.replace('_', '-'), series=version), None)
+for m in info['modules']
+})
+
+del get_info, info, modules_url, trytond_url
diff -r d5c89a0fa160 -r db2eea93e83d {{ cookiecutter.module_name 
}}/doc/design.rst
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/{{ cookiecutter.module_name }}/doc/design.rst Tue Jan 05 16:34:35 
2021 +
@@ -0,0 +1,3 @@
+**
+Design
+**
diff -r d5c89a0fa160 -r db2eea93e83d {{ cookiecutter.module_name 
}}/doc/index.rst
--- a/{{ cookiecutter.module_name }}/doc/index.rst  Tue Dec 22 19:30:17 
2020 +
+++ b/{{ cookiecutter.module_name }}/doc/index.rst  Tue Jan 05 16:34:35 
2021 +
@@ -1,2 +1,9 @@
+{{ '#' * (cookiecutter.module_name|replace('_', ' ')|title|length + 7) }}
 {{ cookiecutter.module_name.replace('_', ' ').title() }} Module
 {{ '#' * (cookiecutter.module_name|replace('_', ' ')|title|length + 7) }}
+
+.. toctree::
+   :maxdepth: 2
+
+   usage
+   design
diff -r d5c89a0fa160 -r db2eea93e83d {{ cookiecutter.module_name 
}}/doc/usage.rst
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/{{ cookiecutter.module_name }}/doc/usage.rst  Tue Jan 05 16:34:35 
2021 +
@@ -0,0 +1,3 @@
+*
+Usage
+*
diff -r d5c89a0fa160 -r db2eea93e83d {{ cookiecutter.module_name }}/setup.py
--- a/{{ cookiecutter.module_name }}/setup.py   Tue Dec 22 19:30:17 2020 +
+++ b/{{ cookiecutter.module_name }}/setup.py   Tue Jan 05 16:34:35 2021 +
@@ -100,7 +100,7 @@
 download_url=download_url,
 project_urls={
 "Bug Tracker": 'https://bugs.tryton.org/',
-"Documentation": 'https://docs.tryton.org/',
+"Documentation": 'https://docs.tryton.org/projects/modules-{{ 
cookiecutter.module_name|replace('_', '-') }}',
 "Forum": 'https://www.tryton.org/forum',
 "Source Code": 'https://hg.tryton.org/modules/{{ 
cookiecutter.module_name }}',
 },



[tryton-commits] changeset in modules/product:default Improve documentation

2021-01-05 Thread David Harper
changeset 4fdb6a6de540 in modules/product:default
details: https://hg.tryton.org/modules/product?cmd=changeset;node=4fdb6a6de540
description:
Improve documentation

issue9635
review308231002
diffstat:

 doc/index.rst |  98 ++
 setup.py  |   7 +++-
 2 files changed, 15 insertions(+), 90 deletions(-)

diffs (133 lines):

diff -r d0b4ceecd55c -r 4fdb6a6de540 doc/index.rst
--- a/doc/index.rst Wed Dec 23 21:55:13 2020 +0100
+++ b/doc/index.rst Tue Jan 05 16:37:37 2021 +
@@ -1,93 +1,15 @@
+##
 Product Module
 ##
 
-The Product module defines the following models: Category of Unit of
-Measure, Unit of Measure, Product Template, Product and Product
-Category.
-
-
-Category of Unit of Measure
-***
-
-A Category of Unit of Measure is simply defined by a name.
-
-
-Unit of Measure
-***
-
-A Unit of Measure is defined by:
-
-- Name.
-- Symbol.
-- UOM category.
-- Rate and a Factor (the later is the inverse of the former).
-- Rounding Precision and Display Digits, used to round and display
-  quantities expressed in the given UOM.
-- Active, allow to disable a UOM.
-
-
-Product category
-
-
-The Product Category Model is just composed of a name. Product
-Categories are organised in a tree structure.
-
-
-Product Template and Product
-
-
-The product concept in Tryton is composed of two models: Product
-Template and Product.
-
-The Product Template model contains the following fields:
+The *Product Module* defines the essential concepts needed to describe
+products in Tryton.
+It lets you define the basic properties of products and their variants,
+and allows you to record how the quantity of a product is measured.
 
-- Name.
-- Code, a common prefix for all products. If a sequence is set on product
-  configuration the code will be read-only and filled using the sequence.
-- Type, whose value can be *Goods*, *Assets*, *Service*.
-- Category.
-- List Price, the default sale price expressed in the List Price UOM.
-  product.
-- List Price UOM.
-- Cost Price, the cost for one unit of this product expressed in the
-  Cost Price UOM.
-- Cost Price UOM.
-- Cost Price Method, which can be *Fixed* or *Average*. Defines how
-  the cost price should be updated. *Fixed* means that the cost price
-  stay unchanged. *Average* means that the cost price is the average
-  cost of all the items that are in stock. It's default value can be defined
-  on product configuration.
-- Default UOM. The default UOM for this product. Used for example to
-  express stock levels.
-- Active, allow to disable a product.
-
+.. toctree::
+   :maxdepth: 2
 
-The Product model extends the Product Template with two fields: Code (aka SKU_)
-and Description. If a sequence is set on product configuration the code will be
-read-only and will be filled in using the sequence. It's also possible to
-define a list of identifiers on product. An identifier is composed by a type
-and a code. The following types are available:
-
-* International Article Number (EAN)
-* International Standard Audiovisual Number (ISAN)
-* International Standard Book Number (ISBN)
-* International Standard Identifier for Libraries (ISIL)
-* International Securities Identification Number (ISIN)
-* International Standard Music Number (ISMN)
-
-.. _SKU: https://en.wikipedia.org/wiki/Stock_keeping_unit
-
-Configuration
-*
-
-The product module uses the section `product` to retrieve some parameters:
-
-- `price_decimal`: defines the number of decimal digits with which the unit
-  prices are stored. The default value is `4`.
-
-- `uom_conversion_decimal`: defines the number of decimal digits with which the
-  conversion rates and factors of UoM are stored. The default value is `12`.
-
-.. warning::
-They can not be lowered once a database is created.
-..
+   usage
+   configuration
+   design
diff -r d0b4ceecd55c -r 4fdb6a6de540 setup.py
--- a/setup.py  Wed Dec 23 21:55:13 2020 +0100
+++ b/setup.py  Tue Jan 05 16:37:37 2021 +
@@ -10,9 +10,12 @@
 
 
 def read(fname):
-return io.open(
+content = io.open(
 os.path.join(os.path.dirname(__file__), fname),
 'r', encoding='utf-8').read()
+content = re.sub(
+r'(?m)^\.\. toctree::\r?\n((^$|^\s.*$)\r?\n)*', '', content)
+return content
 
 
 def get_require_version(name):
@@ -80,7 +83,7 @@
 download_url=download_url,
 project_urls={
 "Bug Tracker": 'https://bugs.tryton.org/',
-"Documentation": 'https://docs.tryton.org/',
+"Documentation": 'https://docs.tryton.org/projects/modules-product/',
 "Forum": 'https://www.tryton.org/forum',
 "Source Code": 'https://hg.tryton.org/modules/product',
 },



[tryton-commits] changeset in modules/account_product:default Improve documentation

2021-01-05 Thread David Harper
changeset 3860aed8d26e in modules/account_product:default
details: 
https://hg.tryton.org/modules/account_product?cmd=changeset;node=3860aed8d26e
description:
Improve documentation

issue9655
review322191002
diffstat:

 doc/conf.py|  61 +
 doc/design.rst |  66 ++
 doc/index.rst  |  13 +++---
 doc/usage.rst  |  33 +
 setup.py   |   8 +-
 5 files changed, 175 insertions(+), 6 deletions(-)

diffs (220 lines):

diff -r 2558aa39e5d4 -r 3860aed8d26e doc/conf.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/doc/conf.py   Tue Jan 05 16:44:34 2021 +
@@ -0,0 +1,61 @@
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
+
+modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/'
+trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/'
+
+
+def get_info():
+import configparser
+import os
+import subprocess
+import sys
+
+module_dir = os.path.dirname(os.path.dirname(__file__))
+
+config = configparser.ConfigParser()
+config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
+info = dict(config.items('tryton'))
+
+result = subprocess.run(
+[sys.executable, 'setup.py', '--name'],
+stdout=subprocess.PIPE, check=True, cwd=module_dir)
+info['name'] = result.stdout.decode('utf-8').strip()
+
+result = subprocess.run(
+[sys.executable, 'setup.py', '--version'],
+stdout=subprocess.PIPE, check=True, cwd=module_dir)
+version = result.stdout.decode('utf-8').strip()
+if 'dev' in version:
+info['series'] = 'latest'
+else:
+info['series'] = '.'.join(version.split('.', 2)[:2])
+
+for key in {'depends', 'extras_depend'}:
+info[key] = info.get(key, '').strip().splitlines()
+info['modules'] = set(info['depends'] + info['extras_depend'])
+info['modules'] -= {'ir', 'res'}
+
+return info
+
+
+info = get_info()
+
+master_doc = 'index'
+project = info['name']
+release = version = info['series']
+default_role = 'ref'
+highlight_language = 'none'
+extensions = [
+'sphinx.ext.intersphinx',
+]
+intersphinx_mapping = {
+'trytond': (trytond_url.format(series=version), None),
+}
+intersphinx_mapping.update({
+m: (modules_url.format(
+module=m.replace('_', '-'), series=version), None)
+for m in info['modules']
+})
+
+del get_info, info, modules_url, trytond_url
diff -r 2558aa39e5d4 -r 3860aed8d26e doc/design.rst
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/doc/design.rstTue Jan 05 16:44:34 2021 +
@@ -0,0 +1,66 @@
+**
+Design
+**
+
+The *Account Product Module* mainly extends existing accounting and product
+concepts.
+
+.. _concept-product:
+
+Product
+===
+
+The *Product* concept is extended with a set of methods that allow access to
+the product's accounting related properties.
+
+Many of these properties are set in the product's accounting category.
+The accounting category is a special type of
+`Product Category `.
+Unlike standard product categories, each product can only have a single
+accounting category.
+
+.. seealso::
+
+   The `Product ` concept is introduced by the
+   :doc:`Product Module `.
+
+.. _model-product.category:
+
+Product Category
+
+
+The *Account Product Module* allows some *Product Categories* to be marked as
+accounting categories.
+These product categories can have accounting properties such as
+`Taxes `, and revenue and expense
+`Accounts ` associated with them.
+
+When placing categories into a structure all the categories in the structure
+must be either standard categories or accounting categories.
+This means an accounting category cannot have a standard category as its
+parent or as any of its subcategories.
+
+.. seealso::
+
+   The `Product Category ` concept is
+   introduced by the :doc:`Product Module `.
+
+.. _model-analytic_account.rule:
+
+Analytic Account Rule
+=
+
+The *Account Product Module* extends the *Analytic Account Rules* allowing
+`Products ` and `Categories ` to be
+used as criteria by the analytic rule engine.
+
+.. note::
+
+   This feature is only available when the *Analytic Account Module* is
+   activated.
+
+.. seealso::
+
+   The `Analytic Account Rule `
+   concept is introduced by the
+   :doc:`Analytic Account Module `.
diff -r 2558aa39e5d4 -r 3860aed8d26e doc/index.rst
--- a/doc/index.rst Sat Dec 19 17:08:44 2020 +0100
+++ b/doc/index.rst Tue Jan 05 16:44:34 2021 +
@@ -1,8 +1,13 @@
+##
 Account Product Module
 ##
 
-The account product module adds accounting on product and category.
+The *Account Product Module* allows products to be associated with accounting
+properties 

[tryton-commits] changeset in modules/product:default Add improved documentation ...

2021-01-05 Thread David Harper
changeset f1ad83824aa6 in modules/product:default
details: https://hg.tryton.org/modules/product?cmd=changeset;node=f1ad83824aa6
description:
Add improved documentation files

issue9635
review308231002
diffstat:

 doc/conf.py   |   61 ++
 doc/configuration.rst |   41 
 doc/design.rst|  168 ++
 doc/usage.rst |   74 ++
 4 files changed, 344 insertions(+), 0 deletions(-)

diffs (360 lines):

diff -r 4fdb6a6de540 -r f1ad83824aa6 doc/conf.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/doc/conf.py   Tue Jan 05 16:40:35 2021 +
@@ -0,0 +1,61 @@
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
+
+modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/'
+trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/'
+
+
+def get_info():
+import configparser
+import os
+import subprocess
+import sys
+
+module_dir = os.path.dirname(os.path.dirname(__file__))
+
+config = configparser.ConfigParser()
+config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
+info = dict(config.items('tryton'))
+
+result = subprocess.run(
+[sys.executable, 'setup.py', '--name'],
+stdout=subprocess.PIPE, check=True, cwd=module_dir)
+info['name'] = result.stdout.decode('utf-8').strip()
+
+result = subprocess.run(
+[sys.executable, 'setup.py', '--version'],
+stdout=subprocess.PIPE, check=True, cwd=module_dir)
+version = result.stdout.decode('utf-8').strip()
+if 'dev' in version:
+info['series'] = 'latest'
+else:
+info['series'] = '.'.join(version.split('.', 2)[:2])
+
+for key in {'depends', 'extras_depend'}:
+info[key] = info.get(key, '').strip().splitlines()
+info['modules'] = set(info['depends'] + info['extras_depend'])
+info['modules'] -= {'ir', 'res'}
+
+return info
+
+
+info = get_info()
+
+master_doc = 'index'
+project = info['name']
+release = version = info['series']
+default_role = 'ref'
+highlight_language = 'none'
+extensions = [
+'sphinx.ext.intersphinx',
+]
+intersphinx_mapping = {
+'trytond': (trytond_url.format(series=version), None),
+}
+intersphinx_mapping.update({
+m: (modules_url.format(
+module=m.replace('_', '-'), series=version), None)
+for m in info['modules']
+})
+
+del get_info, info, modules_url, trytond_url
diff -r 4fdb6a6de540 -r f1ad83824aa6 doc/configuration.rst
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/doc/configuration.rst Tue Jan 05 16:40:35 2021 +
@@ -0,0 +1,41 @@
+*
+Configuration
+*
+
+The *Product Module* uses some settings from the ``[product]`` section of the
+:doc:`configuration file `.
+
+.. _config-product.price_decimal:
+
+``price_decimal``
+=
+
+The ``price_decimal`` setting defines how many decimal places are used when
+storing `Products' ` unit prices.
+
+.. warning::
+
+   Once the database has been created you cannot reduce this value, doing so
+   will break your system's data integrity.
+   Also if you want to increase this value you must also manually change it in
+   the database `IR Configuration `.
+
+The default value is: ``4``
+
+.. _config-product.uom_conversion_decimal:
+
+``uom_conversion_decimal``
+==
+
+The value from the ``uom_conversion_decimal`` setting defines the number of
+decimal places used when storing the conversion rates and factors between
+`Units of Measure `.
+
+.. warning::
+
+   Once the database has been created you cannot reduce this value, doing so
+   will break your system's data integrity.
+   Also if you want to increase this value you must also manually change it in
+   the database `IR Configuration `.
+
+The default value is: ``12``
diff -r 4fdb6a6de540 -r f1ad83824aa6 doc/design.rst
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/doc/design.rstTue Jan 05 16:40:35 2021 +
@@ -0,0 +1,168 @@
+**
+Design
+**
+
+The *Product Module* introduces the following concepts:
+
+.. _concept-product:
+
+Product
+===
+
+The *Product* is the main concept introduced by the *Product Module*.
+It represents an item or service that Tryton stores information about, and is
+often something that gets bought, sold, or produced.
+
+In Tryton product definitions are made up from two parts, the
+`Product Template ` and the
+`Product Variant `.
+Both of these are sometimes referred to as the *Product*, depending on the
+context.
+
+Each product template can have many different product variants, but each
+product variant is based exclusively on one product template.
+
+A product's full code is made up from a prefix code which is defined on the
+product template and a suffix code which is specified on the product 

[tryton-commits] changeset in modules/account:default Improve documentation

2021-01-18 Thread David Harper
changeset 19a27fe2805a in modules/account:default
details: https://hg.tryton.org/modules/account?cmd=changeset;node=19a27fe2805a
description:
Improve documentation

issue9610
review292271005
diffstat:

 doc/conf.py  |   61 
 doc/configuration.rst|   30 
 doc/design/account.rst   |  194 ++
 doc/design/configuration.rst |   16 ++
 doc/design/fiscal-year.rst   |   89 
 doc/design/index.rst |   16 ++
 doc/design/journal.rst   |   85 +++
 doc/design/move.rst  |  177 
 doc/design/tax.rst   |  151 
 doc/design/template.rst  |  128 +
 doc/index.rst|  317 +-
 doc/reference.rst|   49 ++
 doc/setup.rst|   64 
 doc/usage/close.rst  |  106 ++
 doc/usage/create.rst |   57 +++
 doc/usage/index.rst  |   16 ++
 doc/usage/process.rst|   21 ++
 doc/usage/report.rst |   83 +++
 doc/usage/structure.rst  |   36 
 doc/usage/view.rst   |   62 
 setup.py |7 +-
 21 files changed, 1458 insertions(+), 307 deletions(-)

diffs (1869 lines):

diff -r 9dc78c189562 -r 19a27fe2805a doc/conf.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/doc/conf.py   Mon Jan 18 12:57:35 2021 +
@@ -0,0 +1,61 @@
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
+
+modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/'
+trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/'
+
+
+def get_info():
+import configparser
+import os
+import subprocess
+import sys
+
+module_dir = os.path.dirname(os.path.dirname(__file__))
+
+config = configparser.ConfigParser()
+config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
+info = dict(config.items('tryton'))
+
+result = subprocess.run(
+[sys.executable, 'setup.py', '--name'],
+stdout=subprocess.PIPE, check=True, cwd=module_dir)
+info['name'] = result.stdout.decode('utf-8').strip()
+
+result = subprocess.run(
+[sys.executable, 'setup.py', '--version'],
+stdout=subprocess.PIPE, check=True, cwd=module_dir)
+version = result.stdout.decode('utf-8').strip()
+if 'dev' in version:
+info['series'] = 'latest'
+else:
+info['series'] = '.'.join(version.split('.', 2)[:2])
+
+for key in {'depends', 'extras_depend'}:
+info[key] = info.get(key, '').strip().splitlines()
+info['modules'] = set(info['depends'] + info['extras_depend'])
+info['modules'] -= {'ir', 'res'}
+
+return info
+
+
+info = get_info()
+
+master_doc = 'index'
+project = info['name']
+release = version = info['series']
+default_role = 'ref'
+highlight_language = 'none'
+extensions = [
+'sphinx.ext.intersphinx',
+]
+intersphinx_mapping = {
+'trytond': (trytond_url.format(series=version), None),
+}
+intersphinx_mapping.update({
+m: (modules_url.format(
+module=m.replace('_', '-'), series=version), None)
+for m in info['modules']
+})
+
+del get_info, info, modules_url, trytond_url
diff -r 9dc78c189562 -r 19a27fe2805a doc/configuration.rst
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/doc/configuration.rst Mon Jan 18 12:57:35 2021 +
@@ -0,0 +1,30 @@
+*
+Configuration
+*
+
+The *Account Module* uses values from settings in the ``[account]`` section
+of the :doc:`configuration file `.
+
+.. _config-account.reconciliation_chunk:
+
+``reconciliation_chunk``
+
+
+The ``reconciliation_chunk`` defines the size of each block of sequential
+`Account Move Lines ` that are searched for
+`Reconciliation ` proposals.
+Larger chunk sizes allow more lines to be considered together, and sometimes
+better matches to be found.
+
+.. warning::
+
+   The number of combinations of lines considered, and consequently the search
+   time, increases exponentially along with the chunk size.
+   So you should keep this setting to a relatively low value.
+
+.. seealso::
+
+   The `Reconcile Accounts ` wizard for details
+   of how this setting is used.
+
+The default value is: ``10``
diff -r 9dc78c189562 -r 19a27fe2805a doc/design/account.rst
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/doc/design/account.rstMon Jan 18 12:57:35 2021 +
@@ -0,0 +1,194 @@
+.. _model-account.account:
+
+Account
+===
+
+In Tryton the *Account* concept is used to represent the different accounts
+that make up the `Company's ` chart of accounts.
+These accounts are commonly organised into a structure, with each account
+having a single parent and zero or more sub accounts.
+
+The balance of an account is made 

[tryton-commits] changeset in modules/party:default Support building documentatio...

2020-12-16 Thread David Harper
changeset 7b8f07386210 in modules/party:default
details: https://hg.tryton.org/modules/party?cmd=changeset;node=7b8f07386210
description:
Support building documentation with older versions of Sphinx

issue9943
review331531002
diffstat:

 doc/conf.py |  1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diffs (11 lines):

diff -r 483899893ccb -r 7b8f07386210 doc/conf.py
--- a/doc/conf.py   Tue Dec 15 12:40:23 2020 +
+++ b/doc/conf.py   Wed Dec 16 09:59:57 2020 +
@@ -41,6 +41,7 @@
 
 info = get_info()
 
+master_doc = 'index'
 project = info['name']
 release = version = info['series']
 default_role = 'ref'



[tryton-commits] changeset in modules/currency:default Support building documenta...

2020-12-16 Thread David Harper
changeset 6000a7b6d45d in modules/currency:default
details: https://hg.tryton.org/modules/currency?cmd=changeset;node=6000a7b6d45d
description:
Support building documentation with older versions of Sphinx

issue9943
review331531002
diffstat:

 doc/conf.py |  1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diffs (11 lines):

diff -r 95bc22323d2f -r 6000a7b6d45d doc/conf.py
--- a/doc/conf.py   Tue Dec 15 12:27:38 2020 +
+++ b/doc/conf.py   Wed Dec 16 09:59:57 2020 +
@@ -41,6 +41,7 @@
 
 info = get_info()
 
+master_doc = 'index'
 project = info['name']
 release = version = info['series']
 default_role = 'ref'



[tryton-commits] changeset in sao:default Do not load tempusdominus or popper

2021-06-07 Thread David Harper
changeset f18c722f41dd in sao:default
details: https://hg.tryton.org/sao?cmd=changeset=f18c722f41dd
description:
Do not load tempusdominus or popper

issue10481
review331021002
diffstat:

 bower.json |  3 +--
 index.html |  2 --
 2 files changed, 1 insertions(+), 4 deletions(-)

diffs (25 lines):

diff -r 8cfda2f5b7db -r f18c722f41dd bower.json
--- a/bower.jsonWed May 19 15:41:39 2021 +0200
+++ b/bower.jsonMon Jun 07 22:17:19 2021 +0100
@@ -24,8 +24,7 @@
 "fullcalendar": "^3.10.2",
 "mousetrap": "^1.6",
 "bootstrap-rtl-ondemand": "^3.3.4-ondemand",
-"Sortable": "sortablejs#^1.8.4",
-"popper.js": "https://unpkg.com/popper.js;
+"Sortable": "sortablejs#^1.8.4"
   },
   "devDependencies": {
 "qunit": "^1.18"
diff -r 8cfda2f5b7db -r f18c722f41dd index.html
--- a/index.htmlWed May 19 15:41:39 2021 +0200
+++ b/index.htmlMon Jun 07 22:17:19 2021 +0100
@@ -13,8 +13,6 @@
 
 
 
-
-
 
 
 



[tryton-commits] changeset in sao:default Only hide next/previous buttons on XS s...

2021-06-07 Thread David Harper
changeset 16479a3d9f7e in sao:default
details: https://hg.tryton.org/sao?cmd=changeset=16479a3d9f7e
description:
Only hide next/previous buttons on XS screens if they exist

issue10467
review346411002
diffstat:

 src/tab.js |  18 +++---
 1 files changed, 11 insertions(+), 7 deletions(-)

diffs (28 lines):

diff -r f18c722f41dd -r 16479a3d9f7e src/tab.js
--- a/src/tab.jsMon Jun 07 22:17:19 2021 +0100
+++ b/src/tab.jsMon Jun 07 22:21:49 2021 +0100
@@ -260,13 +260,17 @@
 }.bind(this));
 };
 this.menu_def().forEach(add_button.bind(this));
-this.status_label = jQuery('', {
-'class': 'badge',
-}).appendTo(jQuery('', {
-'class': 'navbar-text hidden-xs',
-}).insertAfter(this.buttons.previous));
-this.buttons.previous.addClass('hidden-xs');
-this.buttons.next.addClass('hidden-xs');
+if (this.buttons.previous) {
+this.status_label = jQuery('', {
+'class': 'badge',
+}).appendTo(jQuery('', {
+'class': 'navbar-text hidden-xs',
+}).insertAfter(this.buttons.previous));
+this.buttons.previous.addClass('hidden-xs');
+}
+if (this.buttons.next) {
+this.buttons.next.addClass('hidden-xs');
+}
 toolbar.find('.btn-toolbar > .btn-group').last()
 .addClass( 'hidden-xs')
 .find('.dropdown')



[tryton-commits] changeset in sao:6.0 Do not load tempusdominus or popper

2021-06-23 Thread David Harper
changeset 05091f8429fc in sao:6.0
details: https://hg.tryton.org/sao?cmd=changeset=05091f8429fc
description:
Do not load tempusdominus or popper

issue10481
review331021002
(grafted from f18c722f41dd150b87a9d35e41edaab2da726021)
diffstat:

 bower.json |  3 +--
 index.html |  2 --
 2 files changed, 1 insertions(+), 4 deletions(-)

diffs (25 lines):

diff -r 658ae4e8bc8c -r 05091f8429fc bower.json
--- a/bower.jsonThu Jun 17 21:28:13 2021 +0200
+++ b/bower.jsonMon Jun 07 22:17:19 2021 +0100
@@ -24,8 +24,7 @@
 "fullcalendar": "^3.10.2",
 "mousetrap": "^1.6",
 "bootstrap-rtl-ondemand": "^3.3.4-ondemand",
-"Sortable": "sortablejs#^1.8.4",
-"popper.js": "https://unpkg.com/popper.js;
+"Sortable": "sortablejs#^1.8.4"
   },
   "devDependencies": {
 "qunit": "^1.18"
diff -r 658ae4e8bc8c -r 05091f8429fc index.html
--- a/index.htmlThu Jun 17 21:28:13 2021 +0200
+++ b/index.htmlMon Jun 07 22:17:19 2021 +0100
@@ -13,8 +13,6 @@
 
 
 
-
-
 
 
 



[tryton-commits] changeset in sao:6.0 Only hide next/previous buttons on XS scree...

2021-06-23 Thread David Harper
changeset e00f344517b5 in sao:6.0
details: https://hg.tryton.org/sao?cmd=changeset=e00f344517b5
description:
Only hide next/previous buttons on XS screens if they exist

issue10467
review346411002
(grafted from 16479a3d9f7e4c2a5d43e0ab2242a0e04b4aea84)
diffstat:

 src/tab.js |  18 +++---
 1 files changed, 11 insertions(+), 7 deletions(-)

diffs (28 lines):

diff -r 05091f8429fc -r e00f344517b5 src/tab.js
--- a/src/tab.jsMon Jun 07 22:17:19 2021 +0100
+++ b/src/tab.jsMon Jun 07 22:21:49 2021 +0100
@@ -260,13 +260,17 @@
 }.bind(this));
 };
 this.menu_def().forEach(add_button.bind(this));
-this.status_label = jQuery('', {
-'class': 'badge',
-}).appendTo(jQuery('', {
-'class': 'navbar-text hidden-xs',
-}).insertAfter(this.buttons.previous));
-this.buttons.previous.addClass('hidden-xs');
-this.buttons.next.addClass('hidden-xs');
+if (this.buttons.previous) {
+this.status_label = jQuery('', {
+'class': 'badge',
+}).appendTo(jQuery('', {
+'class': 'navbar-text hidden-xs',
+}).insertAfter(this.buttons.previous));
+this.buttons.previous.addClass('hidden-xs');
+}
+if (this.buttons.next) {
+this.buttons.next.addClass('hidden-xs');
+}
 toolbar.find('.btn-toolbar > .btn-group').last()
 .addClass( 'hidden-xs')
 .find('.dropdown')



[tryton-commits] changeset in sao:default Add containers to board view

2021-06-30 Thread David Harper
changeset d9e05c64f3b3 in sao:default
details: https://hg.tryton.org/sao?cmd=changeset=d9e05c64f3b3
description:
Add containers to board view

issue10537
review367231002
diffstat:

 src/board.js |  1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diffs (11 lines):

diff -r c3c7a1f4b623 -r d9e05c64f3b3 src/board.js
--- a/src/board.js  Fri Jun 11 00:23:59 2021 +0200
+++ b/src/board.js  Wed Jun 30 12:51:04 2021 +0100
@@ -34,6 +34,7 @@
 
 this.context = context;
 this.actions = [];
+this.containers = [];
 this.state_widgets = [];
 this.el = jQuery('', {
 'class': 'board'



[tryton-commits] changeset in sao:default Test readonly attribute on date input

2021-07-07 Thread David Harper
changeset 0ca660dc07da in sao:default
details: https://hg.tryton.org/sao?cmd=changeset=0ca660dc07da
description:
Test readonly attribute on date input

issue10556
review362131002
diffstat:

 src/view/form.js |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 35d3478803db -r 0ca660dc07da src/view/form.js
--- a/src/view/form.js  Fri Jul 02 16:56:53 2021 +0200
+++ b/src/view/form.js  Wed Jul 07 11:46:28 2021 +0100
@@ -1656,7 +1656,7 @@
 }
 }.bind(this));
 mousetrap.bind('=', function(e, combo) {
-if (!this.date.find('input').prop('readonly')) {
+if (!this.date.prop('readonly')) {
 e.preventDefault();
 this.date.val(this._format(this.get_format(), moment()));
 }
@@ -1664,7 +1664,7 @@
 
 Sao.common.DATE_OPERATORS.forEach(function(operator) {
 mousetrap.bind(operator[0], function(e, combo) {
-if (this.date.find('input').prop('readonly')) {
+if (this.date.prop('readonly')) {
 return;
 }
 e.preventDefault();



[tryton-commits] changeset in sao:6.0 Add containers to board view

2021-07-09 Thread David Harper
changeset 711db87b2255 in sao:6.0
details: https://hg.tryton.org/sao?cmd=changeset=711db87b2255
description:
Add containers to board view

issue10537
review367231002
(grafted from d9e05c64f3b3e5062a603782980aa6a58d4c6f8d)
diffstat:

 src/board.js |  1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diffs (11 lines):

diff -r 1a1d2f221dd6 -r 711db87b2255 src/board.js
--- a/src/board.js  Thu Jul 01 21:40:21 2021 +0200
+++ b/src/board.js  Wed Jun 30 12:51:04 2021 +0100
@@ -34,6 +34,7 @@
 
 this.context = context;
 this.actions = [];
+this.containers = [];
 this.state_widgets = [];
 this.el = jQuery('', {
 'class': 'board'



[tryton-commits] changeset in sao:5.8 Add containers to board view

2021-07-09 Thread David Harper
changeset cdaea5d526e4 in sao:5.8
details: https://hg.tryton.org/sao?cmd=changeset=cdaea5d526e4
description:
Add containers to board view

issue10537
review367231002
(grafted from d9e05c64f3b3e5062a603782980aa6a58d4c6f8d)
diffstat:

 src/board.js |  1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diffs (11 lines):

diff -r bff362d0e161 -r cdaea5d526e4 src/board.js
--- a/src/board.js  Thu Jul 01 21:40:49 2021 +0200
+++ b/src/board.js  Wed Jun 30 12:51:04 2021 +0100
@@ -34,6 +34,7 @@
 
 this.context = context;
 this.actions = [];
+this.containers = [];
 this.state_widgets = [];
 this.el = jQuery('', {
 'class': 'board'



[tryton-commits] changeset in sao:default Document use of --legacy-peer-deps for ...

2021-04-30 Thread David Harper
changeset 85c493091c10 in sao:default
details: https://hg.tryton.org/sao?cmd=changeset=85c493091c10
description:
Document use of --legacy-peer-deps for installation

issue10368
review340691002
diffstat:

 README.md |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (20 lines):

diff -r a6faf12f1d3e -r 85c493091c10 README.md
--- a/README.md Fri Apr 23 20:34:44 2021 +0200
+++ b/README.md Fri Apr 30 09:14:55 2021 +0100
@@ -12,14 +12,14 @@
 Once you've downloaded and unpacked the sao source release, enter the directory
 where the archive was unpacked, and run:
 
-$ npm install --production
+$ npm install --production --legacy-peer-deps
 
 Development
 ...
 
 For development, you have to run instead:
 
-$ npm install
+$ npm install --legacy-peer-deps
 $ grunt dev
 
 Setup



[tryton-commits] changeset in sao:default Remove btn-default class when btn-link ...

2021-04-23 Thread David Harper
changeset 698463b5d53d in sao:default
details: https://hg.tryton.org/sao?cmd=changeset=698463b5d53d
description:
Remove btn-default class when btn-link or btn-primary is added

issue8440
review261721002
diffstat:

 src/common.js |   5 +++--
 src/wizard.js |  10 ++
 2 files changed, 9 insertions(+), 6 deletions(-)

diffs (45 lines):

diff -r 65895a545460 -r 698463b5d53d src/common.js
--- a/src/common.js Thu Apr 22 23:45:00 2021 +0200
+++ b/src/common.js Fri Apr 23 20:19:57 2021 +0200
@@ -807,7 +807,7 @@
 };
 
 Sao.common.Button = Sao.class_(Object, {
-init: function(attributes, el, size) {
+init: function(attributes, el, size, style) {
 this.attributes = attributes;
 if (el) {
 this.el = el;
@@ -830,7 +830,8 @@
 }).prependTo(this.el);
 this.icon.hide();
 }
-this.el.addClass('btn btn-default ' + (size || ''));
+this.el.addClass(
+['btn', (style || 'btn-default'), (size || '')].join(' '));
 this.el.attr('type', 'button');
 this.icon.attr('aria-hidden', true);
 this.set_icon(attributes.icon);
diff -r 65895a545460 -r 698463b5d53d src/wizard.js
--- a/src/wizard.js Thu Apr 22 23:45:00 2021 +0200
+++ b/src/wizard.js Fri Apr 23 20:19:57 2021 +0200
@@ -142,13 +142,15 @@
 this.process();
 },
 _get_button: function(definition) {
-var button = new Sao.common.Button(definition);
-this.states[definition.state] = button;
+var style = 'btn-default';
 if (definition.default) {
-button.el.addClass('btn-primary');
+style = 'btn-primary';
 } else if (definition.state == this.end_state) {
-button.el.addClass('btn-link');
+style = 'btn-link';
 }
+var button = new Sao.common.Button(
+definition, undefined, undefined, style);
+this.states[definition.state] = button;
 return button;
 },
 update_buttons: function() {



[tryton-commits] changeset in sao:default Use the appropriate type for email and ...

2021-04-23 Thread David Harper
changeset 180b104a98dd in sao:default
details: https://hg.tryton.org/sao?cmd=changeset=180b104a98dd
description:
Use the appropriate type for email and url widgets

issue9522
review327811002
diffstat:

 CHANGELOG|  1 +
 src/view/form.js |  5 +
 2 files changed, 6 insertions(+), 0 deletions(-)

diffs (30 lines):

diff -r 698463b5d53d -r 180b104a98dd CHANGELOG
--- a/CHANGELOG Fri Apr 23 20:19:57 2021 +0200
+++ b/CHANGELOG Fri Apr 23 20:25:05 2021 +0200
@@ -1,3 +1,4 @@
+* Use appropriate types for email and url widgets
 * Add completion on xxx2Many and Dict
 * Add attachment preview
 * Support document widget
diff -r 698463b5d53d -r 180b104a98dd src/view/form.js
--- a/src/view/form.js  Fri Apr 23 20:19:57 2021 +0200
+++ b/src/view/form.js  Fri Apr 23 20:25:05 2021 +0200
@@ -4229,6 +4229,7 @@
 class_: 'form-url',
 init: function(view, attributes) {
 Sao.View.Form.URL._super.init.call(this, view, attributes);
+this.input.attr('type', 'url');
 this.button = jQuery('', {
 'class': 'btn btn-default',
 'target': '_blank',
@@ -4284,6 +4285,10 @@
 
 Sao.View.Form.Email = Sao.class_(Sao.View.Form.URL, {
 class_: 'form-email',
+init: function(view, attributes) {
+Sao.View.Form.Email._super.init.call(this, view, attributes);
+this.input.attr('type', 'email');
+},
 set_url: function(value) {
 Sao.View.Form.Email._super.set_url.call(this, 'mailto:' + value);
 }



[tryton-commits] changeset in modules/purchase:default Improve documentation

2021-03-17 Thread David Harper
changeset b0a4025dc552 in modules/purchase:default
details: https://hg.tryton.org/modules/purchase?cmd=changeset=b0a4025dc552
description:
Improve documentation

issue9734
review314641002
diffstat:

 doc/conf.py   |   61 
 doc/design.rst|  168 ++
 doc/index.rst |   84 +++---
 doc/usage/index.rst   |   13 +++
 doc/usage/prepurchase.rst |   56 +++
 doc/usage/process.rst |  125 ++
 doc/usage/returns.rst |   52 ++
 setup.py  |7 +-
 8 files changed, 491 insertions(+), 75 deletions(-)

diffs (618 lines):

diff -r 279bbaab28ca -r b0a4025dc552 doc/conf.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/doc/conf.py   Wed Mar 17 10:06:27 2021 +
@@ -0,0 +1,61 @@
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
+
+modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/'
+trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/'
+
+
+def get_info():
+import configparser
+import os
+import subprocess
+import sys
+
+module_dir = os.path.dirname(os.path.dirname(__file__))
+
+config = configparser.ConfigParser()
+config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
+info = dict(config.items('tryton'))
+
+result = subprocess.run(
+[sys.executable, 'setup.py', '--name'],
+stdout=subprocess.PIPE, check=True, cwd=module_dir)
+info['name'] = result.stdout.decode('utf-8').strip()
+
+result = subprocess.run(
+[sys.executable, 'setup.py', '--version'],
+stdout=subprocess.PIPE, check=True, cwd=module_dir)
+version = result.stdout.decode('utf-8').strip()
+if 'dev' in version:
+info['series'] = 'latest'
+else:
+info['series'] = '.'.join(version.split('.', 2)[:2])
+
+for key in {'depends', 'extras_depend'}:
+info[key] = info.get(key, '').strip().splitlines()
+info['modules'] = set(info['depends'] + info['extras_depend'])
+info['modules'] -= {'ir', 'res'}
+
+return info
+
+
+info = get_info()
+
+master_doc = 'index'
+project = info['name']
+release = version = info['series']
+default_role = 'ref'
+highlight_language = 'none'
+extensions = [
+'sphinx.ext.intersphinx',
+]
+intersphinx_mapping = {
+'trytond': (trytond_url.format(series=version), None),
+}
+intersphinx_mapping.update({
+m: (modules_url.format(
+module=m.replace('_', '-'), series=version), None)
+for m in info['modules']
+})
+
+del get_info, info, modules_url, trytond_url
diff -r 279bbaab28ca -r b0a4025dc552 doc/design.rst
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/doc/design.rstWed Mar 17 10:06:27 2021 +
@@ -0,0 +1,168 @@
+**
+Design
+**
+
+The *Purchase Module* introduces some new concepts and updates existing
+concepts to make them work seamlessly with purchases.
+
+.. _model-purchase.purchase:
+
+Purchase
+
+
+The *Purchase* is used to manage the purchasing process.
+Each purchase, at any time, can be in one of several different states.
+A purchase progresses through these states until eventually it is either done
+or gets cancelled.
+When some of these state changes happen the
+`Employee ` that triggered the state change is
+also recorded.
+
+Details are stored about the `Company ` making
+the purchase and any other `Parties `,
+`Contact Mechanisms ` and
+`Addresses ` that relate to it, such as the
+supplier, the contact at the supplier or the party that is sending the
+`Invoice `.
+
+A purchase is identified by a unique number that is generated automatically
+from the configured `Sequence ` and may also have
+other general information such as the purchase date, a description, or a
+reference provided by the supplier.
+
+Each purchase is made up from one or more lines.
+These lines can be put into a particular order if desired.
+Normally most lines on a purchase provide information about which
+`Products ` or items are required.
+Informational lines can also be added for things like titles, comments or
+subtotals.
+
+The total, untaxed, and tax amounts for a purchase are derived from the
+amounts, prices and `Taxes ` of the purchase's
+lines.
+
+A destination `Warehouse ` is required
+for purchases of physical items such as goods or assets.
+The purchase will automatically create `Stock Moves `
+for these products.
+These stock moves are linked to the purchase's lines and must be
+recreated or ignored if they get cancelled.
+
+`Invoices ` relating to the purchase
+may be created, depending on which invoice method is selected.
+These invoices are based on the details from the purchase, and must be
+recreated or ignored if they get cancelled.
+
+.. seealso::
+
+   Purchases can be found 

[tryton-commits] changeset in modules/project:5.8 Add company to module depends

2021-02-24 Thread David Harper
changeset 01d5754e160a in modules/project:5.8
details: https://hg.tryton.org/modules/project?cmd=changeset;node=01d5754e160a
description:
Add company to module depends

issue10093
review331861002
(grafted from 9ae2c4e2476eeda77941a02bcc7178f0e1ed64b5)
diffstat:

 tryton.cfg |  1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diffs (11 lines):

diff -r 0c5f7a4e963e -r 01d5754e160a tryton.cfg
--- a/tryton.cfgFri Jan 01 16:32:14 2021 +0100
+++ b/tryton.cfgWed Feb 17 13:30:58 2021 +
@@ -1,6 +1,7 @@
 [tryton]
 version=5.8.2
 depends:
+company
 company_work_time
 ir
 party



[tryton-commits] changeset in modules/project:5.6 Add company to module depends

2021-02-24 Thread David Harper
changeset be2436146e2e in modules/project:5.6
details: https://hg.tryton.org/modules/project?cmd=changeset;node=be2436146e2e
description:
Add company to module depends

issue10093
review331861002
(grafted from 9ae2c4e2476eeda77941a02bcc7178f0e1ed64b5)
diffstat:

 tryton.cfg |  1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diffs (11 lines):

diff -r cc52709d077f -r be2436146e2e tryton.cfg
--- a/tryton.cfgFri Jan 01 17:08:09 2021 +0100
+++ b/tryton.cfgWed Feb 17 13:30:58 2021 +
@@ -1,6 +1,7 @@
 [tryton]
 version=5.6.2
 depends:
+company
 company_work_time
 ir
 party



[tryton-commits] changeset in modules/project:5.0 Add company to module depends

2021-02-24 Thread David Harper
changeset 3e1718e39e87 in modules/project:5.0
details: https://hg.tryton.org/modules/project?cmd=changeset;node=3e1718e39e87
description:
Add company to module depends

issue10093
review331861002
(grafted from 9ae2c4e2476eeda77941a02bcc7178f0e1ed64b5)
diffstat:

 tryton.cfg |  1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diffs (11 lines):

diff -r 89525bd73a6a -r 3e1718e39e87 tryton.cfg
--- a/tryton.cfgSat Apr 04 17:58:02 2020 +0200
+++ b/tryton.cfgWed Feb 17 13:30:58 2021 +
@@ -1,6 +1,7 @@
 [tryton]
 version=5.0.3
 depends:
+company
 company_work_time
 ir
 party



[tryton-commits] changeset in modules/account_invoice:default Make invoice requir...

2021-02-26 Thread David Harper
changeset b360d3be4594 in modules/account_invoice:default
details: 
https://hg.tryton.org/modules/account_invoice?cmd=changeset;node=b360d3be4594
description:
Make invoice required for invoice tax

issue10111
review339931002
diffstat:

 invoice.py |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 1359075b3390 -r b360d3be4594 invoice.py
--- a/invoice.pySun Feb 21 19:19:26 2021 +0100
+++ b/invoice.pyFri Feb 26 15:41:50 2021 +
@@ -2337,7 +2337,7 @@
 _depends = ['invoice_state']
 
 invoice = fields.Many2One('account.invoice', 'Invoice', ondelete='CASCADE',
-select=True,
+select=True, required=True,
 states={
 'readonly': _states['readonly'] & Bool(Eval('invoice')),
 },



[tryton-commits] changeset in modules/purchase:default Add closing colon to guila...

2021-04-15 Thread David Harper
changeset 416275e5971b in modules/purchase:default
details: https://hg.tryton.org/modules/purchase?cmd=changeset=416275e5971b
description:
Add closing colon to guilabel role in documentation

issue10290
review357831002
diffstat:

 doc/usage/process.rst |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r c68f60eec696 -r 416275e5971b doc/usage/process.rst
--- a/doc/usage/process.rst Sun Apr 11 18:11:05 2021 +0200
+++ b/doc/usage/process.rst Thu Apr 15 17:15:20 2021 +0100
@@ -66,7 +66,7 @@
The supplier shipments that are related to the purchase can be found using
the purchase's :guilabel:`Shipments` link.
 
-   The :guilabel`Shipments` and stock :guilabel:`Moves` related to a purchase
+   The :guilabel:`Shipments` and stock :guilabel:`Moves` related to a purchase
can also be found using the items in the purchase's
:guilabel:`Open related records` menu.
 



[tryton-commits] changeset in modules/sale:default Add closing colon to guilabel ...

2021-04-15 Thread David Harper
changeset eacdfd8eed8d in modules/sale:default
details: https://hg.tryton.org/modules/sale?cmd=changeset=eacdfd8eed8d
description:
Add closing colon to guilabel role in documentation

issue10290
review357831002
diffstat:

 doc/usage/process.rst |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r ab4870fa5be7 -r eacdfd8eed8d doc/usage/process.rst
--- a/doc/usage/process.rst Tue Apr 13 23:54:46 2021 +0200
+++ b/doc/usage/process.rst Thu Apr 15 17:15:20 2021 +0100
@@ -45,7 +45,7 @@
The customer shipments that have been generated from the sale can be found
using the sale's :guilabel:`Shipments` link.
 
-   The :guilabel`Shipments` and stock :guilabel:`Moves` related to a sale
+   The :guilabel:`Shipments` and stock :guilabel:`Moves` related to a sale
can also be found using the items in the sale's
:guilabel:`Open related records` menu.
 
@@ -73,7 +73,7 @@
 .. tip::
 
The invoices that have been generated from the sale can be found using the
-   sale's :guilabel:`Invoices` link or the :guilabel`Invoices` item found in
+   sale's :guilabel:`Invoices` link or the :guilabel:`Invoices` item found in
the sale's :guilabel:`Open related records` menu.
 
 .. _Handling shipment and invoice exceptions:



[tryton-commits] changeset in readthedocs:default Replace glossary with definitio...

2021-04-11 Thread David Harper
changeset 1d6dfbc57028 in readthedocs:default
details: https://hg.tryton.org/readthedocs?cmd=changeset=1d6dfbc57028
description:
Replace glossary with definition list

issue9788
review300801002
diffstat:

 account.rst   |  158 -
 analytic.rst  |   18 ++---
 authentication.rst|   10 +-
 carrier.rst   |   18 ++---
 commission.rst|   10 +-
 company.rst   |   10 +-
 edocument.rst |   10 +-
 index.rst |  138 ---
 marketing.rst |   14 +--
 party.rst |   18 ++---
 product.rst   |   50 +++
 production.rst|   26 +++
 project.rst   |   18 ++---
 purchase.rst  |   42 ++--
 sale.rst  |   98 +++---
 sale_subscription.rst |   10 +-
 stock.rst |  102 +++
 timesheet.rst |   10 +-
 web.rst   |   22 +++---
 19 files changed, 368 insertions(+), 414 deletions(-)

diffs (1095 lines):

diff -r e6901146a010 -r 1d6dfbc57028 account.rst
--- a/account.rst   Sun Apr 11 21:46:45 2021 +0100
+++ b/account.rst   Sun Apr 11 22:20:23 2021 +0100
@@ -5,121 +5,119 @@
 Accounting
 ==
 
-.. glossary::
+`Account `_
+Fundamentals for most accounting needs.
 
-`Account `_
-Fundamentals for most accounting needs.
+`Asset `_
+Depreciation of fixed assets.
 
-`Asset `_
-Depreciation of fixed assets.
+`Belgian `_
+Belgian accounting.
 
-`Belgian `_
-Belgian accounting.
-
-`Cash Rounding `_
-Round cash amounts.
+`Cash Rounding `_
+Round cash amounts.
 
-`Credit Limit `_
-Manages credit limit of parties.
+`Credit Limit `_
+Manages credit limit of parties.
 
-`Deposit `_
-Supports customer deposits.
+`Deposit `_
+Supports customer deposits.
 
-`Dunning `_
-Manages dunning on receivables.
+`Dunning `_
+Manages dunning on receivables.
 
-`Dunning Email `_
-Sends dunning emails.
+`Dunning Email `_
+Sends dunning emails.
 
-`Dunning Fee `_
-Adds fees to dunnings.
+`Dunning Fee `_
+Adds fees to dunnings.
 
-`Dunning Letter `_
-Prints dunning letters.
+`Dunning Letter `_
+Prints dunning letters.
 
-`Spanish `_
-Spanish accounting.
+`Spanish `_
+Spanish accounting.
 
-`Europe `_
-Common European requiremenets.
+`Europe `_
+Common European requiremenets.
 
-`French `_
-French accounting.
+`French `_
+French accounting.
 
-`French Chorus `_
-Sends invoices via Chorus Pro.
+`French Chorus `_
+Sends invoices via Chorus Pro.
 
-`German `_
-German accounting.
+`German `_
+German accounting.
 
-`Invoice `_
-Manages customer and supplier invoices.
+`Invoice `_
+Manages customer and supplier invoices.
 
-`Invoice Correction 
`_
-Correct price on posted invoices.
+`Invoice Correction `_
+Correct price on posted invoices.
 
-`Invoice History `_
-Historize invoice.
+`Invoice History `_
+Historize invoice.
 
-`Invoice Line Standalone 
`_
-Supports invoice line without invoice.
+`Invoice Line Standalone 
`_
+Supports invoice line without invoice.
 
-`Invoice Secondary Unit 
`_
-Adds a secondary unit of measure.
+`Invoice Secondary Unit 
`_
+Adds a secondary unit of measure.
 
-`Invoice Stock `_
-Links invoice lines and stock moves.
+`Invoice Stock `_
+Links invoice lines and stock moves.
 
-`Payment `_
-Manages payments.
+`Payment `_
+Manages payments.
 
-`Payment Braintree 
`_
-Receives payment from Braintree.
+`Payment Braintree `_
+Receives payment from Braintree.
 
-`Payment Clearing `_
-Uses clearing account for payments.
+`Payment Clearing `_
+Uses clearing account for payments.
 
-`Payment SEPA `_
-Genrates SEPA messages for payments.
+`Payment SEPA `_
+Genrates SEPA messages for payments.
 
-`Payment SEPA CFONB 
`_
-Adds CFONB flavors to SEPA.
+`Payment SEPA CFONB `_
+Adds CFONB flavors to SEPA.
 
-`Payment Stripe `_
-Receives payment from Stripe.
+`Payment Stripe `_
+Receives payment from Stripe.
 
-`Product `_
-Adds accounting on product and category.
+`Product `_
+Adds accounting on product and category.
 
-`Statement `_
-Books bank statement, cash daybook etc.
+`Statement `_
+Books bank statement, cash daybook etc.
 
-`Statement AEB43 `_
-Imports statements in AEB43 format.
+`Statement AEB43 `_
+Imports statements in AEB43 format.
 
-`Statement CODA `_
-Imports statements in CODA format.
+`Statement CODA `_
+Imports statements in CODA format.
 
-`Statement OFX `_
-Imports statements in OFX format.

[tryton-commits] changeset in modules/company:default Improve documentation

2021-04-11 Thread David Harper
changeset 4e7e648ccf7a in modules/company:default
details: https://hg.tryton.org/modules/company?cmd=changeset=4e7e648ccf7a
description:
Improve documentation

issue9601
review296281002
diffstat:

 doc/conf.py   |  61 +++
 doc/design.rst|  95 +++
 doc/index.rst |  40 ++
 doc/reference.rst |  67 ++
 doc/usage.rst |  28 
 setup.py  |   7 ++-
 6 files changed, 267 insertions(+), 31 deletions(-)

diffs (342 lines):

diff -r 19959855edb6 -r 4e7e648ccf7a doc/conf.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/doc/conf.py   Sun Apr 11 21:33:54 2021 +0100
@@ -0,0 +1,61 @@
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
+
+modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/'
+trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/'
+
+
+def get_info():
+import configparser
+import os
+import subprocess
+import sys
+
+module_dir = os.path.dirname(os.path.dirname(__file__))
+
+config = configparser.ConfigParser()
+config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
+info = dict(config.items('tryton'))
+
+result = subprocess.run(
+[sys.executable, 'setup.py', '--name'],
+stdout=subprocess.PIPE, check=True, cwd=module_dir)
+info['name'] = result.stdout.decode('utf-8').strip()
+
+result = subprocess.run(
+[sys.executable, 'setup.py', '--version'],
+stdout=subprocess.PIPE, check=True, cwd=module_dir)
+version = result.stdout.decode('utf-8').strip()
+if 'dev' in version:
+info['series'] = 'latest'
+else:
+info['series'] = '.'.join(version.split('.', 2)[:2])
+
+for key in {'depends', 'extras_depend'}:
+info[key] = info.get(key, '').strip().splitlines()
+info['modules'] = set(info['depends'] + info['extras_depend'])
+info['modules'] -= {'ir', 'res'}
+
+return info
+
+
+info = get_info()
+
+master_doc = 'index'
+project = info['name']
+release = version = info['series']
+default_role = 'ref'
+highlight_language = 'none'
+extensions = [
+'sphinx.ext.intersphinx',
+]
+intersphinx_mapping = {
+'trytond': (trytond_url.format(series=version), None),
+}
+intersphinx_mapping.update({
+m: (modules_url.format(
+module=m.replace('_', '-'), series=version), None)
+for m in info['modules']
+})
+
+del get_info, info, modules_url, trytond_url
diff -r 19959855edb6 -r 4e7e648ccf7a doc/design.rst
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/doc/design.rstSun Apr 11 21:33:54 2021 +0100
@@ -0,0 +1,95 @@
+**
+Design
+**
+
+The *Company Module* introduces some new concepts, and extends other existing
+concepts:
+
+.. _model-company.company:
+
+Company
+===
+
+The *Company* is the main concept provided by the *Company Module*.
+In Tryton it is a `Party ` that represents the
+company, or organisation, which the users of the system are members of.
+
+.. seealso::
+
+   Companies can be found by opening the main menu item:
+
+  |Company --> Companies|__
+
+  .. |Company --> Companies| replace:: :menuselection:`Company --> 
Companies`
+  __ https://demo.tryton.org/model/company.company
+
+.. _model-company.employee:
+
+Employee
+
+
+The *Employee* is another important concept introduced by the *Company Module*.
+In Tryton it is a `Party ` that is employed by, or
+works for, one of the `Companies ` which the users are
+members of.
+
+Employees can be organised into a structure by setting each employee's
+supervisor.
+
+.. seealso::
+
+   A list of the employees for all the companies can be found from the main
+   menu item:
+
+  |Company --> Employees|__
+
+  .. |Company --> Employees| replace:: :menuselection:`Company --> 
Employees`
+  __ https://demo.tryton.org/model/company.employee
+
+.. _model-res.user:
+
+User
+
+
+The *Company Module* extends the `User ` concept so
+that each user can be associated with one or more
+`Companies ` and a set of
+`Employees `.
+From these a user then `chooses a current company and employee
+`.
+
+This choice directly affects what data the user has access to in Tryton,
+as models will often link records to a company and restrict access based on
+the user's setup.
+
+.. seealso::
+
+   The *User* concept is introduced by the
+   :doc:`Res Module `.
+
+.. _model-party.party:
+
+Party
+=
+
+The *Company Module* adds an addition report that can be used with
+`Parties `.
+
+.. seealso::
+
+   The *Party* concept is introduced by the :doc:`Party Module `.
+
+Reports
+---
+
+.. _report-party.letter:
+
+Letter
+^^
+
+This report is a document that can be used as the starting point for a letter
+to the selected 

[tryton-commits] changeset in modules/sale:default Improve documentation

2021-04-11 Thread David Harper
changeset 3eef9f032cfb in modules/sale:default
details: https://hg.tryton.org/modules/sale?cmd=changeset=3eef9f032cfb
description:
Improve documentation

issue9764
review328601002
diffstat:

 doc/conf.py |   61 ++
 doc/design.rst  |  272 
 doc/index.rst   |   91 +--
 doc/usage/index.rst |   14 ++
 doc/usage/presales.rst  |   52 +
 doc/usage/process.rst   |  113 +++
 doc/usage/reporting.rst |   20 +++
 doc/usage/returns.rst   |   42 +++
 setup.py|7 +-
 9 files changed, 589 insertions(+), 83 deletions(-)

diffs (728 lines):

diff -r 9e40baf43be1 -r 3eef9f032cfb doc/conf.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/doc/conf.py   Sun Apr 11 21:39:18 2021 +0100
@@ -0,0 +1,61 @@
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
+
+modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/'
+trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/'
+
+
+def get_info():
+import configparser
+import os
+import subprocess
+import sys
+
+module_dir = os.path.dirname(os.path.dirname(__file__))
+
+config = configparser.ConfigParser()
+config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
+info = dict(config.items('tryton'))
+
+result = subprocess.run(
+[sys.executable, 'setup.py', '--name'],
+stdout=subprocess.PIPE, check=True, cwd=module_dir)
+info['name'] = result.stdout.decode('utf-8').strip()
+
+result = subprocess.run(
+[sys.executable, 'setup.py', '--version'],
+stdout=subprocess.PIPE, check=True, cwd=module_dir)
+version = result.stdout.decode('utf-8').strip()
+if 'dev' in version:
+info['series'] = 'latest'
+else:
+info['series'] = '.'.join(version.split('.', 2)[:2])
+
+for key in {'depends', 'extras_depend'}:
+info[key] = info.get(key, '').strip().splitlines()
+info['modules'] = set(info['depends'] + info['extras_depend'])
+info['modules'] -= {'ir', 'res'}
+
+return info
+
+
+info = get_info()
+
+master_doc = 'index'
+project = info['name']
+release = version = info['series']
+default_role = 'ref'
+highlight_language = 'none'
+extensions = [
+'sphinx.ext.intersphinx',
+]
+intersphinx_mapping = {
+'trytond': (trytond_url.format(series=version), None),
+}
+intersphinx_mapping.update({
+m: (modules_url.format(
+module=m.replace('_', '-'), series=version), None)
+for m in info['modules']
+})
+
+del get_info, info, modules_url, trytond_url
diff -r 9e40baf43be1 -r 3eef9f032cfb doc/design.rst
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/doc/design.rstSun Apr 11 21:39:18 2021 +0100
@@ -0,0 +1,272 @@
+**
+Design
+**
+
+The *Sale Module* introduces the concepts that are required to manage sales.
+It also extends existing concepts so sales become an fully integrated part of
+the system.
+
+.. _model-sale.sale:
+
+Sale
+
+
+The *Sale* concept is used to manage the selling process.
+Each sale, at any time, can be in one of several different states.
+A sale progress though these states until it is either done or gets cancelled.
+When some of these state changes happen the
+`Employee ` that triggered the state change
+is also recorded.
+
+Each sale contains details of the `Party ` that the
+sale is made to, including details such as the party's preferred
+`Contact Method `, and what
+`Addresses ` the shipments and invoices must be
+sent to.
+
+A sale is identified by a unique number that is generated automatically from
+the configured `Sequence `.
+It also has other general information like a sale date, description, and
+reference used by the customer.
+
+The sale is made up from one, or more, sales lines.
+These lines can be arranged into a particular order, if required.
+Normally most sales lines provide information about which
+`Products ` or items are included in the sale.
+Extra lines can be added for things like titles, comments or subtotals.
+
+The total, untaxed, and tax amounts for a sale are derived from the amounts,
+prices and `Taxes ` of the sale's lines.
+
+For sales of physical items, such as goods or assets, the
+`Warehouse ` the items are dispatched
+from is required.
+The sale's shipment method determines whether
+`Customer Shipments ` are automatically created
+for the sale, and when during the process this happens.
+If customer shipments do get created then the
+`Stock Moves ` on these shipments are linked to the
+sale lines and must be recreated or ignored if they get cancelled.
+
+`Invoices ` can be generated
+automatically at the correct time based on the invoice method.
+These invoices are created from data taken from the sale, and when invoicing
+based on shipment they also use 

[tryton-commits] changeset in readthedocs:default Mark as orphans any files not i...

2021-04-11 Thread David Harper
changeset e6901146a010 in readthedocs:default
details: https://hg.tryton.org/readthedocs?cmd=changeset=e6901146a010
description:
Mark as orphans any files not in a toctree

issue9788
review298981004
diffstat:

 account.rst   |  2 ++
 analytic.rst  |  2 ++
 authentication.rst|  2 ++
 carrier.rst   |  2 ++
 commission.rst|  2 ++
 company.rst   |  2 ++
 edocument.rst |  2 ++
 marketing.rst |  2 ++
 party.rst |  2 ++
 product.rst   |  2 ++
 production.rst|  2 ++
 project.rst   |  2 ++
 purchase.rst  |  2 ++
 sale.rst  |  2 ++
 sale_subscription.rst |  2 ++
 stock.rst |  2 ++
 timesheet.rst |  2 ++
 web.rst   |  2 ++
 18 files changed, 36 insertions(+), 0 deletions(-)

diffs (162 lines):

diff -r 1a7a86af1668 -r e6901146a010 account.rst
--- a/account.rst   Sat Apr 10 16:06:47 2021 +0200
+++ b/account.rst   Sun Apr 11 21:46:45 2021 +0100
@@ -1,3 +1,5 @@
+:orphan:
+
 .. _index-accounting:
 
 Accounting
diff -r 1a7a86af1668 -r e6901146a010 analytic.rst
--- a/analytic.rst  Sat Apr 10 16:06:47 2021 +0200
+++ b/analytic.rst  Sun Apr 11 21:46:45 2021 +0100
@@ -1,3 +1,5 @@
+:orphan:
+
 .. _index-analytic-accounting:
 
 Analytic Accounting
diff -r 1a7a86af1668 -r e6901146a010 authentication.rst
--- a/authentication.rstSat Apr 10 16:06:47 2021 +0200
+++ b/authentication.rstSun Apr 11 21:46:45 2021 +0100
@@ -1,3 +1,5 @@
+:orphan:
+
 .. _index-authentication:
 
 Authentication
diff -r 1a7a86af1668 -r e6901146a010 carrier.rst
--- a/carrier.rst   Sat Apr 10 16:06:47 2021 +0200
+++ b/carrier.rst   Sun Apr 11 21:46:45 2021 +0100
@@ -1,3 +1,5 @@
+:orphan:
+
 .. _index-carrier:
 
 Carrier
diff -r 1a7a86af1668 -r e6901146a010 commission.rst
--- a/commission.rstSat Apr 10 16:06:47 2021 +0200
+++ b/commission.rstSun Apr 11 21:46:45 2021 +0100
@@ -1,3 +1,5 @@
+:orphan:
+
 .. _index-commission:
 
 Commission
diff -r 1a7a86af1668 -r e6901146a010 company.rst
--- a/company.rst   Sat Apr 10 16:06:47 2021 +0200
+++ b/company.rst   Sun Apr 11 21:46:45 2021 +0100
@@ -1,3 +1,5 @@
+:orphan:
+
 .. _index-company:
 
 Company
diff -r 1a7a86af1668 -r e6901146a010 edocument.rst
--- a/edocument.rst Sat Apr 10 16:06:47 2021 +0200
+++ b/edocument.rst Sun Apr 11 21:46:45 2021 +0100
@@ -1,3 +1,5 @@
+:orphan:
+
 .. _index-edocument:
 
 Electronic Document
diff -r 1a7a86af1668 -r e6901146a010 marketing.rst
--- a/marketing.rst Sat Apr 10 16:06:47 2021 +0200
+++ b/marketing.rst Sun Apr 11 21:46:45 2021 +0100
@@ -1,3 +1,5 @@
+:orphan:
+
 .. _index-marketing:
 
 Marketing
diff -r 1a7a86af1668 -r e6901146a010 party.rst
--- a/party.rst Sat Apr 10 16:06:47 2021 +0200
+++ b/party.rst Sun Apr 11 21:46:45 2021 +0100
@@ -1,3 +1,5 @@
+:orphan:
+
 .. _index-party:
 
 Party
diff -r 1a7a86af1668 -r e6901146a010 product.rst
--- a/product.rst   Sat Apr 10 16:06:47 2021 +0200
+++ b/product.rst   Sun Apr 11 21:46:45 2021 +0100
@@ -1,3 +1,5 @@
+:orphan:
+
 .. _index-product:
 
 Product
diff -r 1a7a86af1668 -r e6901146a010 production.rst
--- a/production.rstSat Apr 10 16:06:47 2021 +0200
+++ b/production.rstSun Apr 11 21:46:45 2021 +0100
@@ -1,3 +1,5 @@
+:orphan:
+
 .. _index-production:
 
 Production
diff -r 1a7a86af1668 -r e6901146a010 project.rst
--- a/project.rst   Sat Apr 10 16:06:47 2021 +0200
+++ b/project.rst   Sun Apr 11 21:46:45 2021 +0100
@@ -1,3 +1,5 @@
+:orphan:
+
 .. _index-project:
 
 Project
diff -r 1a7a86af1668 -r e6901146a010 purchase.rst
--- a/purchase.rst  Sat Apr 10 16:06:47 2021 +0200
+++ b/purchase.rst  Sun Apr 11 21:46:45 2021 +0100
@@ -1,3 +1,5 @@
+:orphan:
+
 .. _index-purchase:
 
 Purchase
diff -r 1a7a86af1668 -r e6901146a010 sale.rst
--- a/sale.rst  Sat Apr 10 16:06:47 2021 +0200
+++ b/sale.rst  Sun Apr 11 21:46:45 2021 +0100
@@ -1,3 +1,5 @@
+:orphan:
+
 .. _index-sale:
 
 Sale
diff -r 1a7a86af1668 -r e6901146a010 sale_subscription.rst
--- a/sale_subscription.rst Sat Apr 10 16:06:47 2021 +0200
+++ b/sale_subscription.rst Sun Apr 11 21:46:45 2021 +0100
@@ -1,3 +1,5 @@
+:orphan:
+
 .. _index-sale_subscription:
 
 Sale Subscription
diff -r 1a7a86af1668 -r e6901146a010 stock.rst
--- a/stock.rst Sat Apr 10 16:06:47 2021 +0200
+++ b/stock.rst Sun Apr 11 21:46:45 2021 +0100
@@ -1,3 +1,5 @@
+:orphan:
+
 .. _index-stock:
 
 Stock
diff -r 1a7a86af1668 -r e6901146a010 timesheet.rst
--- a/timesheet.rst Sat Apr 10 16:06:47 2021 +0200
+++ b/timesheet.rst Sun Apr 11 21:46:45 2021 +0100
@@ -1,3 +1,5 @@
+:orphan:
+
 .. _index-timesheet:
 
 Timesheet
diff -r 1a7a86af1668 -r e6901146a010 web.rst
--- a/web.rst   Sat Apr 10 16:06:47 2021 +0200
+++ b/web.rst   Sun Apr 11 21:46:45 2021 +0100
@@ -1,3 +1,5 @@
+:orphan:
+
 .. _index-web:
 
 Web



[tryton-commits] changeset in modules/stock:default Rename inventory count field ...

2021-04-11 Thread David Harper
changeset 57b7fe208133 in modules/stock:default
details: https://hg.tryton.org/modules/stock?cmd=changeset=57b7fe208133
description:
Rename inventory count field quantity_added to quantity

issue7873
review287621002
diffstat:

 CHANGELOG|   1 +
 inventory.py |  18 +-
 tests/scenario_stock_inventory_count.rst |   6 +++---
 view/inventory_count_quantity_form.xml   |   4 ++--
 4 files changed, 15 insertions(+), 14 deletions(-)

diffs (94 lines):

diff -r cbd95ac133f8 -r 57b7fe208133 CHANGELOG
--- a/CHANGELOG Sat Apr 10 23:46:24 2021 +0200
+++ b/CHANGELOG Sun Apr 11 22:25:13 2021 +0100
@@ -1,3 +1,4 @@
+* Rename inventory count quantity_added to quantity
 * Add document source on move of product quantities by warehouse
 * Add relate from assigned shipment to products quantities by warehouse
 * Show quantities by warehouse for many products
diff -r cbd95ac133f8 -r 57b7fe208133 inventory.py
--- a/inventory.py  Sat Apr 10 23:46:24 2021 +0200
+++ b/inventory.py  Sun Apr 11 22:25:13 2021 +0100
@@ -600,7 +600,7 @@
 values['uom'] = line.uom.id
 values['unit_digits'] = line.unit_digits
 if line.uom.rounding == 1:
-values['quantity_added'] = 1
+values['quantity'] = 1
 return values
 
 def get_line_domain(self, inventory):
@@ -623,12 +623,12 @@
 return values
 
 def transition_add(self):
-if self.quantity.line and self.quantity.quantity_added:
+if self.quantity.line and self.quantity.quantity:
 line = self.quantity.line
 if line.quantity:
-line.quantity += self.quantity.quantity_added
+line.quantity += self.quantity.quantity
 else:
-line.quantity = self.quantity.quantity_added
+line.quantity = self.quantity.quantity
 line.save()
 return 'search'
 
@@ -682,15 +682,15 @@
 readonly=True, depends=['unit_digits'],
 help="The total amount of the line counted so far.")
 
-quantity_added = fields.Float(
-"Added Quantity", digits=(16, Eval('unit_digits', 2)), required=True,
+quantity = fields.Float(
+"Quantity", digits=(16, Eval('unit_digits', 2)), required=True,
 depends=['unit_digits'],
 help="The quantity to add to the existing count.")
 
 unit_digits = fields.Integer("Unit Digits", readonly=True)
 
-@fields.depends('quantity_added', 'line')
-def on_change_quantity_added(self):
+@fields.depends('quantity', 'line')
+def on_change_quantity(self):
 if self.line:
 self.total_quantity = (
-(self.line.quantity or 0) + (self.quantity_added or 0))
+(self.line.quantity or 0) + (self.quantity or 0))
diff -r cbd95ac133f8 -r 57b7fe208133 tests/scenario_stock_inventory_count.rst
--- a/tests/scenario_stock_inventory_count.rst  Sat Apr 10 23:46:24 2021 +0200
+++ b/tests/scenario_stock_inventory_count.rst  Sun Apr 11 22:25:13 2021 +0100
@@ -82,7 +82,7 @@
 ... name='stock.inventory,%s.product.product,%s.count_create' % (
 ... inventory.id, product.id)).save()
 >>> count.execute('quantity')
->>> count.form.quantity_added
+>>> count.form.quantity
 1
 >>> count.form.total_quantity
 1
@@ -99,9 +99,9 @@
 ... name='stock.inventory,%s.product.product,%s.count_create' % (
 ... inventory.id, product2.id)).save()
 >>> count.execute('quantity')
->>> count.form.quantity_added
+>>> count.form.quantity
 >>> count.form.total_quantity
->>> count.form.quantity_added = 10
+>>> count.form.quantity = 10
 >>> count.form.total_quantity
 10.0
 >>> count.execute('add')
diff -r cbd95ac133f8 -r 57b7fe208133 view/inventory_count_quantity_form.xml
--- a/view/inventory_count_quantity_form.xmlSat Apr 10 23:46:24 2021 +0200
+++ b/view/inventory_count_quantity_form.xmlSun Apr 11 22:25:13 2021 +0100
@@ -6,7 +6,7 @@
 
 
 
-
-
+
+
 
 



[tryton-commits] changeset in modules/stock_lot_unit:default Rename inventory cou...

2021-04-11 Thread David Harper
changeset be4c2569640e in modules/stock_lot_unit:default
details: 
https://hg.tryton.org/modules/stock_lot_unit?cmd=changeset=be4c2569640e
description:
Rename inventory count field quantity_added to quantity

issue7873
review287621002
diffstat:

 stock.py |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 6b10943ccf7c -r be4c2569640e stock.py
--- a/stock.py  Wed Feb 03 21:19:06 2021 +0100
+++ b/stock.py  Sun Apr 11 22:25:13 2021 +0100
@@ -151,7 +151,7 @@
 values = super(InventoryCount, self).default_quantity(fields)
 line = InventoryLine(values['line'])
 if line.lot and line.lot.unit:
-values['quantity_added'] = UoM.compute_qty(
+values['quantity'] = UoM.compute_qty(
 line.lot.unit, line.lot.unit_quantity,
 line.uom)
 return values



[tryton-commits] changeset in modules/project:default Add company to module depends

2021-02-17 Thread David Harper
changeset 9ae2c4e2476e in modules/project:default
details: https://hg.tryton.org/modules/project?cmd=changeset;node=9ae2c4e2476e
description:
Add company to module depends

issue10093
review331861002
diffstat:

 tryton.cfg |  1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diffs (11 lines):

diff -r 4e10feb92057 -r 9ae2c4e2476e tryton.cfg
--- a/tryton.cfgSat Dec 19 17:08:46 2020 +0100
+++ b/tryton.cfgWed Feb 17 13:30:58 2021 +
@@ -1,6 +1,7 @@
 [tryton]
 version=5.9.0
 depends:
+company
 company_work_time
 ir
 party



[tryton-commits] changeset in modules/account_invoice_stock:default Improve docum...

2021-02-17 Thread David Harper
changeset 8a5e54db6bda in modules/account_invoice_stock:default
details: 
https://hg.tryton.org/modules/account_invoice_stock?cmd=changeset;node=8a5e54db6bda
description:
Improve documentation

issue9716
review316221002
diffstat:

 doc/conf.py   |  61 +++
 doc/index.rst |   7 +++--
 setup.py  |   8 +-
 3 files changed, 71 insertions(+), 5 deletions(-)

diffs (107 lines):

diff -r 61dfd17b8423 -r 8a5e54db6bda doc/conf.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/doc/conf.py   Wed Feb 17 13:37:08 2021 +
@@ -0,0 +1,61 @@
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
+
+modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/'
+trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/'
+
+
+def get_info():
+import configparser
+import os
+import subprocess
+import sys
+
+module_dir = os.path.dirname(os.path.dirname(__file__))
+
+config = configparser.ConfigParser()
+config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
+info = dict(config.items('tryton'))
+
+result = subprocess.run(
+[sys.executable, 'setup.py', '--name'],
+stdout=subprocess.PIPE, check=True, cwd=module_dir)
+info['name'] = result.stdout.decode('utf-8').strip()
+
+result = subprocess.run(
+[sys.executable, 'setup.py', '--version'],
+stdout=subprocess.PIPE, check=True, cwd=module_dir)
+version = result.stdout.decode('utf-8').strip()
+if 'dev' in version:
+info['series'] = 'latest'
+else:
+info['series'] = '.'.join(version.split('.', 2)[:2])
+
+for key in {'depends', 'extras_depend'}:
+info[key] = info.get(key, '').strip().splitlines()
+info['modules'] = set(info['depends'] + info['extras_depend'])
+info['modules'] -= {'ir', 'res'}
+
+return info
+
+
+info = get_info()
+
+master_doc = 'index'
+project = info['name']
+release = version = info['series']
+default_role = 'ref'
+highlight_language = 'none'
+extensions = [
+'sphinx.ext.intersphinx',
+]
+intersphinx_mapping = {
+'trytond': (trytond_url.format(series=version), None),
+}
+intersphinx_mapping.update({
+m: (modules_url.format(
+module=m.replace('_', '-'), series=version), None)
+for m in info['modules']
+})
+
+del get_info, info, modules_url, trytond_url
diff -r 61dfd17b8423 -r 8a5e54db6bda doc/index.rst
--- a/doc/index.rst Mon Feb 15 19:13:09 2021 +0100
+++ b/doc/index.rst Wed Feb 17 13:37:08 2021 +
@@ -1,7 +1,8 @@
+
 Account Invoice Stock Module
 
 
-The account invoice stock module adds link between invoice lines and stock
+The *Account Invoice Stock Module* links together invoice lines and stock
 moves.
-The unit price of the stock move is updated with the average price of the
-posted invoice lines that are linked to it.
+This allows a stock move's unit price to be updated from the average price
+of the linked invoice lines.
diff -r 61dfd17b8423 -r 8a5e54db6bda setup.py
--- a/setup.py  Mon Feb 15 19:13:09 2021 +0100
+++ b/setup.py  Wed Feb 17 13:37:08 2021 +
@@ -10,9 +10,12 @@
 
 
 def read(fname):
-return io.open(
+content = io.open(
 os.path.join(os.path.dirname(__file__), fname),
 'r', encoding='utf-8').read()
+content = re.sub(
+r'(?m)^\.\. toctree::\r?\n((^$|^\s.*$)\r?\n)*', '', content)
+return content
 
 
 def get_require_version(name):
@@ -80,7 +83,8 @@
 download_url=download_url,
 project_urls={
 "Bug Tracker": 'https://bugs.tryton.org/',
-"Documentation": 'https://docs.tryton.org/',
+"Documentation":
+'https://docs.tryton.org/projects/modules-account-invoice-stock/',
 "Forum": 'https://www.tryton.org/forum',
 "Source Code": 'https://hg.tryton.org/modules/account_invoice_stock',
 },



[tryton-commits] changeset in modules/account_invoice:default Improve documentation

2021-02-17 Thread David Harper
changeset cdef7fe6a80a in modules/account_invoice:default
details: 
https://hg.tryton.org/modules/account_invoice?cmd=changeset;node=cdef7fe6a80a
description:
Improve documentation

issue9708
review308351002
diffstat:

 doc/conf.py   |   61 +++
 doc/configuration.rst |   28 +++
 doc/design.rst|  198 ++
 doc/index.rst |  170 ++
 doc/usage/amend.rst   |   57 ++
 doc/usage/index.rst   |   13 +++
 doc/usage/prepare.rst |  105 ++
 doc/usage/process.rst |  104 ++
 setup.py  |8 +-
 9 files changed, 581 insertions(+), 163 deletions(-)

diffs (800 lines):

diff -r 6d6edd30fca8 -r cdef7fe6a80a doc/conf.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/doc/conf.py   Wed Feb 17 13:41:42 2021 +
@@ -0,0 +1,61 @@
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
+
+modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/'
+trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/'
+
+
+def get_info():
+import configparser
+import os
+import subprocess
+import sys
+
+module_dir = os.path.dirname(os.path.dirname(__file__))
+
+config = configparser.ConfigParser()
+config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
+info = dict(config.items('tryton'))
+
+result = subprocess.run(
+[sys.executable, 'setup.py', '--name'],
+stdout=subprocess.PIPE, check=True, cwd=module_dir)
+info['name'] = result.stdout.decode('utf-8').strip()
+
+result = subprocess.run(
+[sys.executable, 'setup.py', '--version'],
+stdout=subprocess.PIPE, check=True, cwd=module_dir)
+version = result.stdout.decode('utf-8').strip()
+if 'dev' in version:
+info['series'] = 'latest'
+else:
+info['series'] = '.'.join(version.split('.', 2)[:2])
+
+for key in {'depends', 'extras_depend'}:
+info[key] = info.get(key, '').strip().splitlines()
+info['modules'] = set(info['depends'] + info['extras_depend'])
+info['modules'] -= {'ir', 'res'}
+
+return info
+
+
+info = get_info()
+
+master_doc = 'index'
+project = info['name']
+release = version = info['series']
+default_role = 'ref'
+highlight_language = 'none'
+extensions = [
+'sphinx.ext.intersphinx',
+]
+intersphinx_mapping = {
+'trytond': (trytond_url.format(series=version), None),
+}
+intersphinx_mapping.update({
+m: (modules_url.format(
+module=m.replace('_', '-'), series=version), None)
+for m in info['modules']
+})
+
+del get_info, info, modules_url, trytond_url
diff -r 6d6edd30fca8 -r cdef7fe6a80a doc/configuration.rst
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/doc/configuration.rst Wed Feb 17 13:41:42 2021 +
@@ -0,0 +1,28 @@
+*
+Configuration
+*
+
+The *Account Invoice Module* uses some settings from the ``[account_invoice]``
+section of the :doc:`configuration file `.
+
+.. _config-account_invoice.filestore:
+
+``filestore``
+=
+
+This configuration value indicates whether the cached copy of the
+`Customer Invoice Reports ` should be stored in the
+:py:mod:`trytond:trytond.filestore` (``True``) or the database (``False``).
+
+The default value is: ``False``
+
+.. _config-account_invoice.store_prefix:
+
+``store_prefix``
+
+
+This is the prefix to use with the :py:mod:`trytond:trytond.filestore`.
+This value is only used when the
+`filestore ` setting is in use.
+
+The default value is: ``None``
diff -r 6d6edd30fca8 -r cdef7fe6a80a doc/design.rst
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/doc/design.rstWed Feb 17 13:41:42 2021 +
@@ -0,0 +1,198 @@
+Design
+**
+
+The *Account Invoice Module* adds some new concepts and extends some existing
+concepts.
+
+.. _model-account.invoice:
+
+Invoice
+===
+
+The main concept introduced by the *Account Invoice Module* is the *Invoice*.
+This contains details of a purchase, or sales, transaction between the
+`Company ` and another
+`Party `.
+
+Each invoice has a type that indicates whether it is an invoice from a
+supplier, or to a customer.
+Credit notes are represented by invoices with negative totals.
+
+Additional information is also stored for each invoice, including things like
+a unique `Sequence ` number,
+invoice, accounting and payment term dates,
+`Payment Terms `,
+`Tax Identifiers `,
+`Currency ` information,
+the customer's or supplier's invoice `Address `,
+and other descriptions and reference numbers.
+
+An invoice is made up from one, or more, invoice lines.
+Most lines normally contain information about the items that were bought or
+sold, including information about the `Products `,
+quantities, `Taxes ` and 

[tryton-commits] changeset in modules/stock:default Improve documentation

2021-02-06 Thread David Harper
changeset 0032a1985534 in modules/stock:default
details: https://hg.tryton.org/modules/stock?cmd=changeset;node=0032a1985534
description:
Improve documentation

issue9681
review302311002
diffstat:

 doc/conf.py  |   61 
 doc/design/configuration.rst |   17 ++
 doc/design/index.rst |   16 ++
 doc/design/inventory.rst |   48 ++
 doc/design/location.rst  |   59 +++
 doc/design/move.rst  |   58 +++
 doc/design/period.rst|   32 
 doc/design/product.rst   |   97 +
 doc/design/shipment.rst  |  231 +++
 doc/index.rst|  319 +-
 doc/reference.rst|   13 +
 doc/setup.rst|   69 +
 doc/usage/index.rst  |   14 +
 doc/usage/period.rst |   16 ++
 doc/usage/quantity.rst   |   98 +
 doc/usage/shipment.rst   |  125 
 doc/usage/value.rst  |   66 
 setup.py |7 +-
 18 files changed, 1038 insertions(+), 308 deletions(-)

diffs (1438 lines):

diff -r 86bbfaea7a8c -r 0032a1985534 doc/conf.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/doc/conf.py   Sat Feb 06 10:51:53 2021 +
@@ -0,0 +1,61 @@
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
+
+modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/'
+trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/'
+
+
+def get_info():
+import configparser
+import os
+import subprocess
+import sys
+
+module_dir = os.path.dirname(os.path.dirname(__file__))
+
+config = configparser.ConfigParser()
+config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
+info = dict(config.items('tryton'))
+
+result = subprocess.run(
+[sys.executable, 'setup.py', '--name'],
+stdout=subprocess.PIPE, check=True, cwd=module_dir)
+info['name'] = result.stdout.decode('utf-8').strip()
+
+result = subprocess.run(
+[sys.executable, 'setup.py', '--version'],
+stdout=subprocess.PIPE, check=True, cwd=module_dir)
+version = result.stdout.decode('utf-8').strip()
+if 'dev' in version:
+info['series'] = 'latest'
+else:
+info['series'] = '.'.join(version.split('.', 2)[:2])
+
+for key in {'depends', 'extras_depend'}:
+info[key] = info.get(key, '').strip().splitlines()
+info['modules'] = set(info['depends'] + info['extras_depend'])
+info['modules'] -= {'ir', 'res'}
+
+return info
+
+
+info = get_info()
+
+master_doc = 'index'
+project = info['name']
+release = version = info['series']
+default_role = 'ref'
+highlight_language = 'none'
+extensions = [
+'sphinx.ext.intersphinx',
+]
+intersphinx_mapping = {
+'trytond': (trytond_url.format(series=version), None),
+}
+intersphinx_mapping.update({
+m: (modules_url.format(
+module=m.replace('_', '-'), series=version), None)
+for m in info['modules']
+})
+
+del get_info, info, modules_url, trytond_url
diff -r 86bbfaea7a8c -r 0032a1985534 doc/design/configuration.rst
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/doc/design/configuration.rst  Sat Feb 06 10:51:53 2021 +
@@ -0,0 +1,17 @@
+.. _model-stock.configuration:
+
+Configuration
+=
+
+The *Stock Configuration* contains settings that are used to configure the
+behaviour and default values for stock related activities, including the
+sequences used to generate `Shipment ` numbers.
+
+.. seealso::
+
+   The stock configuration can be found using the main menu item:
+
+  |Inventory & Stock --> Configuration --> Stock Configuration|__
+
+  .. |Inventory & Stock --> Configuration --> Stock Configuration| 
replace:: :menuselection:`Inventory & Stock --> Configuration --> Stock 
Configuration`
+  __ https://demo.tryton.org/model/stock.configuration/1
diff -r 86bbfaea7a8c -r 0032a1985534 doc/design/index.rst
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/doc/design/index.rst  Sat Feb 06 10:51:53 2021 +
@@ -0,0 +1,16 @@
+**
+Design
+**
+
+The stock module introduces or extends the following concepts.
+
+.. toctree::
+   :maxdepth: 1
+
+   location
+   move
+   shipment
+   inventory
+   period
+   configuration
+   product
diff -r 86bbfaea7a8c -r 0032a1985534 doc/design/inventory.rst
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/doc/design/inventory.rst  Sat Feb 06 10:51:53 2021 +
@@ -0,0 +1,48 @@
+.. _model-stock.inventory:
+
+Inventory
+=
+
+The *Inventory* concept is used to help check and correct the amount of
+stock stored in a `Location `.
+
+Each inventory has a set of lines, one for each `Product `
+that is in, or is should be in, the location.
+Each line has an expected quantity and an actual 

[tryton-commits] changeset in trytond:default Add trigonometric functions to sqli...

2021-02-06 Thread David Harper
changeset caadf76bf505 in trytond:default
details: https://hg.tryton.org/trytond?cmd=changeset;node=caadf76bf505
description:
Add trigonometric functions to sqlite backend

issue9996
review333731002
diffstat:

 CHANGELOG  |   1 +
 trytond/backend/sqlite/database.py |  11 +++
 trytond/tests/test_backend.py  |   9 +
 3 files changed, 21 insertions(+), 0 deletions(-)

diffs (48 lines):

diff -r ef88d61b9594 -r caadf76bf505 CHANGELOG
--- a/CHANGELOG Fri Feb 05 00:21:10 2021 +0100
+++ b/CHANGELOG Sat Feb 06 10:47:06 2021 +
@@ -1,3 +1,4 @@
+* Add trigonometric functions to sqlite backend
 * Allow skipping user warnings globally
 * Add validate option to trytond-admin
 * Refresh pool of other processes
diff -r ef88d61b9594 -r caadf76bf505 trytond/backend/sqlite/database.py
--- a/trytond/backend/sqlite/database.pyFri Feb 05 00:21:10 2021 +0100
+++ b/trytond/backend/sqlite/database.pySat Feb 06 10:47:06 2021 +
@@ -375,6 +375,17 @@
 self._conn.create_function('trunc', 1, math.trunc)
 self._conn.create_function('trunc', 2, trunc)
 
+# Trigonomentric functions
+self._conn.create_function('acos', 1, math.acos)
+self._conn.create_function('asin', 1, math.asin)
+self._conn.create_function('atan', 1, math.atan)
+self._conn.create_function('atan2', 2, math.atan2)
+self._conn.create_function('cos', 1, math.cos)
+self._conn.create_function(
+'cot', 1, lambda x: 1 / math.tan(x) if x else math.inf)
+self._conn.create_function('sin', 1, math.sin)
+self._conn.create_function('tan', 1, math.tan)
+
 # Random functions
 self._conn.create_function('random', 0, random.random)
 self._conn.create_function('setseed', 1, random.seed)
diff -r ef88d61b9594 -r caadf76bf505 trytond/tests/test_backend.py
--- a/trytond/tests/test_backend.py Fri Feb 05 00:21:10 2021 +0100
+++ b/trytond/tests/test_backend.py Sat Feb 06 10:47:06 2021 +
@@ -110,6 +110,15 @@
 (functions.Sqrt(2.), 1.4142135623731),
 (functions.Trunc(42.8), 42),
 (functions.Trunc(42.4348, 2), 42.43),
+(functions.Acos(0.5), 1.0471975511965979),
+(functions.Asin(0.5), 0.5235987755982989),
+(functions.Atan(0.5), 0.4636476090008061),
+(functions.Atan2(0.5, 0.5), 0.7853981633974483),
+(functions.Cos(1), 0.5403023058681398),
+(functions.Cot(0), math.inf),
+(functions.Cot(1), 0.6420926159343306),
+(functions.Sin(1), 0.8414709848078965),
+(functions.Tan(1), 1.5574077246549023),
 (functions.CharLength('jose'), 4),
 (functions.Lower('TOM'), 'tom'),
 (functions.Overlay('Tas', 'hom', 2, 4), 'Thomas'),



[tryton-commits] changeset in modules/project:default Improve project module docu...

2021-08-31 Thread David Harper
changeset fd57d9653a2f in modules/project:default
details: https://hg.tryton.org/modules/project?cmd=changeset=fd57d9653a2f
description:
Improve project module documentation

issue10092
review341341002
diffstat:

 doc/conf.py|   61 +
 doc/design.rst |  105 +
 doc/index.rst  |   36 +++---
 doc/usage.rst  |   28 +++
 setup.py   |7 ++-
 5 files changed, 206 insertions(+), 31 deletions(-)

diffs (277 lines):

diff -r cccab2e1da5b -r fd57d9653a2f doc/conf.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/doc/conf.py   Tue Aug 31 13:33:26 2021 +0100
@@ -0,0 +1,61 @@
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
+
+modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/'
+trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/'
+
+
+def get_info():
+import configparser
+import os
+import subprocess
+import sys
+
+module_dir = os.path.dirname(os.path.dirname(__file__))
+
+config = configparser.ConfigParser()
+config.read_file(open(os.path.join(module_dir, 'tryton.cfg')))
+info = dict(config.items('tryton'))
+
+result = subprocess.run(
+[sys.executable, 'setup.py', '--name'],
+stdout=subprocess.PIPE, check=True, cwd=module_dir)
+info['name'] = result.stdout.decode('utf-8').strip()
+
+result = subprocess.run(
+[sys.executable, 'setup.py', '--version'],
+stdout=subprocess.PIPE, check=True, cwd=module_dir)
+version = result.stdout.decode('utf-8').strip()
+if 'dev' in version:
+info['series'] = 'latest'
+else:
+info['series'] = '.'.join(version.split('.', 2)[:2])
+
+for key in {'depends', 'extras_depend'}:
+info[key] = info.get(key, '').strip().splitlines()
+info['modules'] = set(info['depends'] + info['extras_depend'])
+info['modules'] -= {'ir', 'res'}
+
+return info
+
+
+info = get_info()
+
+master_doc = 'index'
+project = info['name']
+release = version = info['series']
+default_role = 'ref'
+highlight_language = 'none'
+extensions = [
+'sphinx.ext.intersphinx',
+]
+intersphinx_mapping = {
+'trytond': (trytond_url.format(series=version), None),
+}
+intersphinx_mapping.update({
+m: (modules_url.format(
+module=m.replace('_', '-'), series=version), None)
+for m in info['modules']
+})
+
+del get_info, info, modules_url, trytond_url
diff -r cccab2e1da5b -r fd57d9653a2f doc/design.rst
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/doc/design.rstTue Aug 31 13:33:26 2021 +0100
@@ -0,0 +1,105 @@
+**
+Design
+**
+
+The *Project Module* introduces some new concepts and extends some existing
+concepts:
+
+.. _model-project.work:
+
+Work Effort
+===
+
+The *Work Effort* concept is used to represent work that must be done for
+projects, or parts of projects.
+
+Each *Work Effort* is described by a name and a type, and there is space
+for additional comments to be added when required.
+
+The estimated time and effort needed for a the work is recorded, and it is
+also possible to track the actual time and effort required.
+
+If timesheets are selected to be used, then the time spent on the work can
+be recorded by `Employees ` by creating
+`Timesheet Lines ` with the right
+`Timesheet Works `.
+The *Timesheet Works* for the *Work Efforts* are automatically created and
+deleted as needed.
+
+The current progress of a project's work and its
+`Work Status ` is also recorded.
+
+A project's work can be structured by giving work efforts a parent and some
+children, if required.
+
+Each *Work Effort* has a type.
+Once a work effort has been created it can be changed to a different type
+if its scope, or the amount of work required, changes.
+
+.. seealso::
+
+   Work efforts can be found by opening the main menu item:
+
+  |Project --> Configuration --> Works Efforts|__
+
+  .. |Project --> Configuration --> Works Efforts| replace:: 
:menuselection:`Project --> Configuration --> Works Efforts`
+  __ https://demo.tryton.org/model/project.work
+
+.. _concept-project.work.project:
+
+Project
+---
+
+A *Project* is a type of *Work Effort* that is used for larger and more
+complex work.
+
+It can have a `Party ` and
+`Party Address `.
+These are used to record who the project is for.
+
+.. seealso::
+
+   A list of projects can be found using the main menu item:
+
+  |Project --> Projects --> Projects|__
+
+  .. |Project --> Projects --> Projects| replace:: :menuselection:`Project 
--> Projects --> Projects`
+  __ 
https://demo.tryton.org/model/project.work;name="Projects"=[["type"%2C"%3D"%2C"project;]]
+
+.. _concept-project.work.task:
+
+Task
+
+
+A *Task* is a type of *Work Effort* that is used for smaller pieces 

[tryton-commits] changeset in modules/sale:5.8 Add country to module depends

2021-08-30 Thread David Harper
changeset d82a4b6df358 in modules/sale:5.8
details: https://hg.tryton.org/modules/sale?cmd=changeset=d82a4b6df358
description:
Add country to module depends

issue9889
review333271002
(grafted from 3202c3272495c685822b47cbd0c1cdc788894f23)
diffstat:

 tryton.cfg |  1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diffs (11 lines):

diff -r dd267b379f80 -r d82a4b6df358 tryton.cfg
--- a/tryton.cfgFri Aug 06 09:26:18 2021 +0200
+++ b/tryton.cfgWed Dec 09 09:58:14 2020 +
@@ -6,6 +6,7 @@
 account_invoice_stock
 account_product
 company
+country
 currency
 ir
 party



[tryton-commits] changeset in modules/sale:5.0 Add country to module depends

2021-08-30 Thread David Harper
changeset c5bee65e8009 in modules/sale:5.0
details: https://hg.tryton.org/modules/sale?cmd=changeset=c5bee65e8009
description:
Add country to module depends

issue9889
review333271002
(grafted from 3202c3272495c685822b47cbd0c1cdc788894f23)
diffstat:

 tryton.cfg |  1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diffs (11 lines):

diff -r 5c8b670bb244 -r c5bee65e8009 tryton.cfg
--- a/tryton.cfgThu Jun 17 22:04:19 2021 +0200
+++ b/tryton.cfgWed Dec 09 09:58:14 2020 +
@@ -6,6 +6,7 @@
 account_invoice_stock
 account_product
 company
+country
 currency
 ir
 party



[tryton-commits] changeset in sao:6.0 Test readonly attribute on date input

2021-07-21 Thread David Harper
changeset c35866d19e3e in sao:6.0
details: https://hg.tryton.org/sao?cmd=changeset=c35866d19e3e
description:
Test readonly attribute on date input

issue10556
review362131002
(grafted from 0ca660dc07da9b273f29e1c262143f8633cee55c)
diffstat:

 src/view/form.js |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 0e9dc5739847 -r c35866d19e3e src/view/form.js
--- a/src/view/form.js  Wed Jul 21 08:17:05 2021 +0200
+++ b/src/view/form.js  Wed Jul 07 11:46:28 2021 +0100
@@ -1647,7 +1647,7 @@
 }
 }.bind(this));
 mousetrap.bind('=', function(e, combo) {
-if (!this.date.find('input').prop('readonly')) {
+if (!this.date.prop('readonly')) {
 e.preventDefault();
 this.date.val(this._format(this.get_format(), moment()));
 }
@@ -1655,7 +1655,7 @@
 
 Sao.common.DATE_OPERATORS.forEach(function(operator) {
 mousetrap.bind(operator[0], function(e, combo) {
-if (this.date.find('input').prop('readonly')) {
+if (this.date.prop('readonly')) {
 return;
 }
 e.preventDefault();



[tryton-commits] changeset in www.tryton.org:default Only number h2 in content

2022-03-24 Thread David Harper
changeset bd7330552622 in www.tryton.org:default
details: https://hg.tryton.org/www.tryton.org?cmd=changeset=bd7330552622
description:
Only number h2 in content

issue11149
review374691003
diffstat:

 templates/service_providers_start.html |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 1757f8987557 -r bd7330552622 templates/service_providers_start.html
--- a/templates/service_providers_start.htmlWed Feb 16 01:45:48 2022 +0100
+++ b/templates/service_providers_start.htmlThu Mar 24 08:51:09 2022 +
@@ -16,7 +16,7 @@
 body {
 counter-reset: step;
 }
-h2:before {
+#content h2:before {
 counter-increment: step;
 content: counter(step) ". ";
 }



[tryton-commits] changeset in modules/account_product:default Improve tooltip for...

2022-03-24 Thread David Harper
changeset c1d66023ce74 in modules/account_product:default
details: 
https://hg.tryton.org/modules/account_product?cmd=changeset=c1d66023ce74
description:
Improve tooltip for accounting checkbox

issue10056
review333781008
diffstat:

 product.py |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 6862ec5208cc -r c1d66023ce74 product.py
--- a/product.pyThu Feb 03 23:13:26 2022 +0100
+++ b/product.pyThu Mar 24 08:58:47 2022 +
@@ -60,7 +60,7 @@
 'readonly': Bool(Eval('childs', [0])) | Bool(Eval('parent')),
 },
 depends=['parent'],
-help="Check to convert into accounting category.")
+help="Check to indicate the category is used for accounting.")
 account_parent = fields.Boolean('Use Parent\'s accounts',
 states={
 'invisible': ~Eval('accounting', False),



[tryton-commits] changeset in trytond:default Allow CORS on root path

2022-03-24 Thread David Harper
changeset 1e4006f86e3f in trytond:default
details: https://hg.tryton.org/trytond?cmd=changeset=1e4006f86e3f
description:
Allow CORS on root path

issue10974
review379651002
diffstat:

 CHANGELOG   |  1 +
 trytond/protocols/dispatcher.py |  3 ++-
 2 files changed, 3 insertions(+), 1 deletions(-)

diffs (22 lines):

diff -r f2b6ed007150 -r 1e4006f86e3f CHANGELOG
--- a/CHANGELOG Tue Mar 22 09:53:36 2022 +0100
+++ b/CHANGELOG Thu Mar 24 09:59:09 2022 +
@@ -1,3 +1,4 @@
+* Allow CORS on root path
 * Allow button access to be deactivated
 * Always return tuple for MultiSelection
 * Use default selectors instead of select
diff -r f2b6ed007150 -r 1e4006f86e3f trytond/protocols/dispatcher.py
--- a/trytond/protocols/dispatcher.py   Tue Mar 22 09:53:36 2022 +0100
+++ b/trytond/protocols/dispatcher.py   Thu Mar 24 09:59:09 2022 +
@@ -86,8 +86,9 @@
 return methods[request.rpc_method](request, *request.rpc_params)
 
 
+@app.route('/', methods=['OPTIONS'])
 @app.route('/', methods=['OPTIONS'])
-def options(request, path):
+def options(request, path=None):
 return Response(status=HTTPStatus.NO_CONTENT)
 
 



[tryton-commits] changeset in www.tryton.org:default Update gulp-sass and use dar...

2022-01-18 Thread David Harper
changeset c8a12d87e511 in www.tryton.org:default
details: https://hg.tryton.org/www.tryton.org?cmd=changeset=c8a12d87e511
description:
Update gulp-sass and use dart sass compiler

issue10698
review358741003
diffstat:

 gulpfile.js   |  3 ++-
 package.json  |  3 ++-
 sass/bootstrap/_override.scss |  3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diffs (60 lines):

diff -r 9dc15d2f2407 -r c8a12d87e511 gulpfile.js
--- a/gulpfile.js   Tue Jan 18 16:27:30 2022 +
+++ b/gulpfile.js   Tue Jan 18 16:31:30 2022 +
@@ -1,7 +1,7 @@
 var gulp = require('gulp');
 var uglify = require('gulp-uglify');
 var concat = require('gulp-concat');
-var sass = require('gulp-sass');
+var sass = require('gulp-sass')(require('sass'));
 var sassPackageImporter = require('node-sass-package-importer');
 var autoprefixer = require('gulp-autoprefixer');
 var cleanCSS = require('gulp-clean-css');
@@ -48,6 +48,7 @@
 .pipe(sass({
 importer: sassPackageImporter(),
 outputStyle: 'compressed',
+quietDeps: true,
 }).on('error', sass.logError))
 .pipe(autoprefixer())
 .pipe(cleanCSS())
diff -r 9dc15d2f2407 -r c8a12d87e511 package.json
--- a/package.json  Tue Jan 18 16:27:30 2022 +
+++ b/package.json  Tue Jan 18 16:31:30 2022 +
@@ -13,7 +13,7 @@
 "gulp-iconfont": "^11.0.1",
 "gulp-iconfont-css": "^3.0.0",
 "gulp-rename": "^2.0.0",
-"gulp-sass": "^4.1.0",
+"gulp-sass": "^5.1.0",
 "gulp-sourcemaps": "^3.0.0",
 "gulp-touch-fd": "^2.0.0",
 "gulp-uglify": "^3.0.2",
@@ -25,6 +25,7 @@
 "popper.js": "^1.16.1"
   },
   "devDependencies": {
+"sass": "^1.48.0",
 "sass-lint": "^1.13.1"
   }
 }
diff -r 9dc15d2f2407 -r c8a12d87e511 sass/bootstrap/_override.scss
--- a/sass/bootstrap/_override.scss Tue Jan 18 16:27:30 2022 +
+++ b/sass/bootstrap/_override.scss Tue Jan 18 16:31:30 2022 +
@@ -1,6 +1,7 @@
 // OVERRIDE BOOTSTRAP
 // @Override Bootstrap variables
 // See "bootstrap/scss/_variables.scss"
+@use "sass:math";
 
 // COLORS
 $primary: $tryton-color-primary;
@@ -52,7 +53,7 @@
 // SPACERS
 $spacers: (
   'gutter': $grid-gutter-width,
-  'gutter-half': $grid-gutter-width / 2,
+  'gutter-half': math.div($grid-gutter-width, 2),
   );
 
 // CONTAINER



[tryton-commits] changeset in www.tryton.org:default Update javascript dependencies

2022-01-18 Thread David Harper
changeset 9dc15d2f2407 in www.tryton.org:default
details: https://hg.tryton.org/www.tryton.org?cmd=changeset=9dc15d2f2407
description:
Update javascript dependencies

issue10698
review334831002
diffstat:

 gulpfile.js  |   2 +-
 package.json |  12 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diffs (41 lines):

diff -r f4b7d7d8e4d9 -r 9dc15d2f2407 gulpfile.js
--- a/gulpfile.js   Sat Jan 15 17:50:28 2022 +0100
+++ b/gulpfile.js   Tue Jan 18 16:27:30 2022 +
@@ -16,7 +16,7 @@
 'node_modules/jquery/dist/jquery.slim.js',
 'node_modules/popper.js/dist/umd/popper.js',
 'node_modules/bootstrap/dist/js/bootstrap.js',
-
'node_modules/loading-attribute-polyfill/loading-attribute-polyfill.js',
+
'node_modules/loading-attribute-polyfill/dist/loading-attribute-polyfill.umd.js',
 'js/highlight.pack.js',
 'js/highlight.js',
 'js/lazy.js'])
diff -r f4b7d7d8e4d9 -r 9dc15d2f2407 package.json
--- a/package.json  Sat Jan 15 17:50:28 2022 +0100
+++ b/package.json  Tue Jan 18 16:27:30 2022 +
@@ -7,19 +7,19 @@
   "dependencies": {
 "bootstrap": "^4.5.0",
 "gulp": "^4.0.2",
-"gulp-autoprefixer": "^7.0.1",
+"gulp-autoprefixer": "^8.0.0",
 "gulp-clean-css": "^4.3.0",
 "gulp-concat": "^2.6.1",
-"gulp-iconfont": "^10.0.3",
+"gulp-iconfont": "^11.0.1",
 "gulp-iconfont-css": "^3.0.0",
 "gulp-rename": "^2.0.0",
 "gulp-sass": "^4.1.0",
-"gulp-sourcemaps": "^2.6.5",
+"gulp-sourcemaps": "^3.0.0",
 "gulp-touch-fd": "^2.0.0",
 "gulp-uglify": "^3.0.2",
-"jquery": "^3.5.1",
-"leaflet": "^1.6.0",
-"loading-attribute-polyfill": "^1.5.3",
+"jquery": "^3.6.0",
+"leaflet": "^1.7.1",
+"loading-attribute-polyfill": "^2.0.1",
 "material-icons": "^0.3.1",
 "node-sass-package-importer": "^5.3.2",
 "popper.js": "^1.16.1"



[tryton-commits] changeset in www.tryton.org:default Remove use of text-justify

2022-01-25 Thread David Harper
changeset e9142f9b1590 in www.tryton.org:default
details: https://hg.tryton.org/www.tryton.org?cmd=changeset=e9142f9b1590
description:
Remove use of text-justify

The text-justify class has been dropped from bootstrap 5 as it can be a 
failure criterion in WCAG.

issue11150

review370681002
diffstat:

 templates/foundation.html |  10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (48 lines):

diff -r 925295c8818a -r e9142f9b1590 templates/foundation.html
--- a/templates/foundation.html Tue Jan 18 16:35:59 2022 +
+++ b/templates/foundation.html Tue Jan 25 15:51:16 2022 +
@@ -21,7 +21,7 @@
 
 Foundation
 
-
+
 
 The Tryton Foundation is a private foundation 
(Fondation Privée) formed under the Belgian law.
 It aims to protect, promote and develop Tryton as Free 
Software.
@@ -32,7 +32,7 @@
 
 {{ heart | safe }} 
Donations
 
-
+
 
 Please, visit our donations page to learn more about
 how you can help the Foundation to keep going and who 
has already supported us.
@@ -53,7 +53,7 @@
 
 Mission  Organization
 
-
+
 What does the Tryton Foundation do?
 The Tryton Foundation:
 
@@ -63,7 +63,7 @@
 manages and promotes the Tryton trademark.
 
 
-
+
 How is the foundation organized?
 In the spirit of democracy the foundation want to recognize 
everyone's work in Tryton.
 So a specific status is available for people or companies 
active in the community:
@@ -92,7 +92,7 @@
 
 Trademark
 
-
+
 https://euipo.europa.eu/eSearch/#details/trademarks/010548411;>Tryton
 is a registered trademark of the Tryton Fondation Privée.
 Any third-party using the term "Tryton" must do so only to 
refer to the https://www.tryton.org/;>Tryton project, and not to 
refer to any other project or activity, unless the reference is unrelated to 
the Nice Classifications (9, 37, and 42) covered in the registration.
 



[tryton-commits] changeset in www.tryton.org:default Replace jumbotron with padding

2022-01-25 Thread David Harper
changeset 364a53fdda62 in www.tryton.org:default
details: https://hg.tryton.org/www.tryton.org?cmd=changeset=364a53fdda62
description:
Replace jumbotron with padding

The jumbotron has been removed in bootstrap 5 as it can be replicated 
using classes for padding and rounded corners.

issue11150

review360791003
diffstat:

 templates/index.html |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r e9142f9b1590 -r 364a53fdda62 templates/index.html
--- a/templates/index.html  Tue Jan 25 15:51:16 2022 +
+++ b/templates/index.html  Tue Jan 25 15:52:05 2022 +
@@ -266,7 +266,7 @@
 
 
 
-
+
 
 
 



[tryton-commits] changeset in www.tryton.org:default Ensure all tables have table...

2022-01-25 Thread David Harper
changeset 4fa58cecde7e in www.tryton.org:default
details: https://hg.tryton.org/www.tryton.org?cmd=changeset=4fa58cecde7e
description:
Ensure all tables have table classes

Bootstrap classes applied to tr and td elements in tables without a 
table class are not applied in bootstrap 5.

issue11150
review387791002
diffstat:

 templates/guidelines/help.html |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 364a53fdda62 -r 4fa58cecde7e templates/guidelines/help.html
--- a/templates/guidelines/help.htmlTue Jan 25 15:52:05 2022 +
+++ b/templates/guidelines/help.htmlTue Jan 25 15:52:52 2022 +
@@ -74,7 +74,7 @@
 Fields
 
 Avoid using this or that when referring 
to the field's value because the help text may be used when the value is not 
visible:
-
+
 
 Use:
 "The last date when the MODEL-NAME can be 
used."
@@ -85,7 +85,7 @@
 On selection fields don't refer to the selection's options, these 
may change depending on what modules are activated.
 Help text for fields should describe either what is contained in 
the field or what it is used for.
 Avoid using verbs for these:
-
+
 
 Use:
 "Used to group stock moves together."



[tryton-commits] changeset in www.tryton.org:default Update to Bootstrap 5 and re...

2022-08-07 Thread David Harper
changeset ee3db5afe81d in www.tryton.org:default
details: https://hg.tryton.org/www.tryton.org?cmd=changeset=ee3db5afe81d
description:
Update to Bootstrap 5 and remove jQuery

issue11150
review355931002
diffstat:

 gulpfile.js|   3 +-
 js/lazy.js |  11 +++-
 package.json   |   4 +-
 sass/bootstrap/_override.scss  |  22 +++-
 sass/footer/_footer.scss   |   2 +-
 templates/contribute.html  |  14 ++--
 templates/donate.html  |   2 +-
 templates/donate_cancel.html   |   4 +-
 templates/donate_thanks.html   |   4 +-
 templates/download.html|  16 ++--
 templates/events/layout.html   |   8 +-
 templates/guidelines/documentation.html|  30 +-
 templates/guidelines/help.html |  20 +++---
 templates/index.html   |  22 +++---
 templates/layout-toc.html  |   4 +-
 templates/layout.html  |  28 
 templates/service_providers.html   |   2 +-
 templates/service_providers_start.html |   8 +-
 templates/success_stories/advocate-consulting-legal-group.html |   2 +-
 templates/success_stories/ammeba.html  |   2 +-
 templates/success_stories/camir.html   |   4 +-
 templates/success_stories/grufesa.html |   2 +-
 templates/success_stories/koolvet.html |   4 +-
 templates/success_stories/mifarma.html |   2 +-
 templates/success_stories/revelle.html |   2 +-
 templates/success_stories/wenger-energie.html  |   2 +-
 templates/utils.html   |   4 +-
 27 files changed, 126 insertions(+), 102 deletions(-)

diffs (813 lines):

diff -r e21d651dc807 -r ee3db5afe81d gulpfile.js
--- a/gulpfile.js   Sun Jul 24 12:09:32 2022 +0200
+++ b/gulpfile.js   Sun Aug 07 16:43:23 2022 +0200
@@ -11,8 +11,7 @@
 
 gulp.task('main-js', function() {
 return gulp.src([
-'node_modules/jquery/dist/jquery.slim.js',
-'node_modules/popper.js/dist/umd/popper.js',
+'node_modules/@popperjs/core/dist/umd/popper.js',
 'node_modules/bootstrap/dist/js/bootstrap.js',
 
'node_modules/loading-attribute-polyfill/dist/loading-attribute-polyfill.umd.js',
 'js/highlight.pack.js',
diff -r e21d651dc807 -r ee3db5afe81d js/lazy.js
--- a/js/lazy.jsSun Jul 24 12:09:32 2022 +0200
+++ b/js/lazy.jsSun Aug 07 16:43:23 2022 +0200
@@ -1,4 +1,4 @@
-$(document).ready(function() {
+var lazy_callback = function() {
 if ("IntersectionObserver" in window) {
 lazyElements = document.querySelectorAll(".lazy");
 var lazyObserver = new IntersectionObserver(function(entries, 
observer) {
@@ -15,4 +15,11 @@
 lazyObserver.observe(element);
 });
 }
-});
+};
+
+if (document.readyState === "complete" ||
+(document.readyState !== "loading" && !document.documentElement.doScroll)) 
{
+lazy_callback();
+} else {
+document.addEventListener("DOMContentLoaded", callback);
+}
diff -r e21d651dc807 -r ee3db5afe81d package.json
--- a/package.json  Sun Jul 24 12:09:32 2022 +0200
+++ b/package.json  Sun Aug 07 16:43:23 2022 +0200
@@ -5,7 +5,7 @@
   "description": "NPM Tryton",
   "author": "Pierre Gomba",
   "dependencies": {
-"bootstrap": "^4.5.0",
+"bootstrap": "^5.1.3",
 "gulp": "^4.0.2",
 "gulp-autoprefixer": "^8.0.0",
 "gulp-clean-css": "^4.3.0",
@@ -20,7 +20,7 @@
 "loading-attribute-polyfill": "^2.0.1",
 "material-icons": "^1.10.6",
 "node-sass-package-importer": "^5.3.2",
-"popper.js": "^1.16.1"
+"@popperjs/core": "^2.11.2"
   },
   "devDependencies": {
 "sass": "^1.48.0",
diff -r e21d651dc807 -r ee3db5afe81d sass/bootstrap/_override.scss
--- a/sass/bootstrap/_override.scss Sun Jul 24 12:09:32 2022 +0200
+++ b/sass/bootstrap/_override.scss Sun Aug 07 16:43:23 2022 +0200
@@ -14,7 +14,15 @@
 $dark: $tryton-color-dark;
 $body-color: $tryton-color-body;
 $theme-colors: (
-  'white': #fff,
+  "primary":$primary,
+  "secondary":  $secondary,
+  "success":$success,
+  "info":   $info,
+  "warning":$warning,
+  "danger": $danger,
+  "light":  $light,
+  "dark":   $dark,
+  'white':  #fff,
 );
 
 // Text
@@ -37,10 +45,15 @@
 $navbar-light-color: rgba($black, .6) !default;
 $dropdown-bg: $dark;
 $dropdown-link-color: 

<    1   2   3   4   5