Skip to content

Commit

Permalink
Merge PR #345 into 12.0
Browse files Browse the repository at this point in the history
Signed-off-by legalsylvain
  • Loading branch information
github-grap-bot committed Nov 21, 2023
2 parents e6ed056 + 4d5fb47 commit e692b56
Show file tree
Hide file tree
Showing 16 changed files with 53 additions and 23 deletions.
6 changes: 2 additions & 4 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Do NOT update manually; changes here will be overwritten by Copier
_commit: 7de0cb5
_commit: a7bd24b
_src_path: https://github.com/grap/oca-addons-repo-template-new.git
ci: GitHub
dependency_installation_mode: PIP
generate_requirements_txt: true
github_check_license: true
github_ci_extra_env: {}
Expand All @@ -12,6 +11,7 @@ github_enable_stale_action: false
github_enforce_dev_status_compatibility: false
include_wkhtmltopdf: false
odoo_real_version: 12.0
odoo_test_flavor: Odoo
odoo_version: 16.0
org_name: GRAP
org_slug: grap
Expand All @@ -21,6 +21,4 @@ repo_description: This repository contains Odoo modules developped by the compan
repo_name: Custom Odoo modules for GRAP
repo_slug: grap-odoo-custom
repo_website: https://github.com/grap/grap-odoo-custom
travis_apt_packages: []
travis_apt_sources: []

1 change: 1 addition & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ globals:
odoo: readonly
openerp: readonly
owl: readonly
luxon: readonly

# Styling is handled by Prettier, so we only need to enable AST rules;
# see https://github.com/OCA/maintainer-quality-tools/pull/618#issuecomment-558576890
Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ jobs:
pre-commit:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v2
with:
python-version: "3.11"
- name: Get python version
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- uses: actions/cache@v1
Expand All @@ -25,6 +27,15 @@ jobs:
run: pip install pre-commit
- name: Run pre-commit
run: pre-commit run --all-files --show-diff-on-failure --color=always
env:
# Consider valid a PR that changes README fragments but doesn't
# change the README.rst file itself. It's not really a problem
# because the bot will update it anyway after merge. This way, we
# lower the barrier for functional contributors that want to fix the
# readme fragments, while still letting developers get README
# auto-generated (which also helps functionals when using runboat).
# DOCS https://pre-commit.com/#temporarily-disabling-hooks
SKIP: oca-gen-addon-readme
- name: Check that all files generated by pre-commit are in git
run: |
newfiles="$(git ls-files --others --exclude-from=.gitignore)"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
matrix:
include:
- container: ghcr.io/oca/oca-ci/py3.6-odoo12.0:latest
makepot: "false"
name: test with Odoo
makepot: "false"
services:
postgres:
image: postgres:9.6
Expand All @@ -31,7 +31,7 @@ jobs:
ports:
- 5432:5432
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install addons and dependencies
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# <GRAP>
# Do not share pdf file. (grap-odoo-business-supplier-invoice)
*.pdf
# </GRAP>

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
14 changes: 12 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ exclude: |
(?x)
# NOT INSTALLABLE ADDONS
# END NOT INSTALLABLE ADDONS
# <GRAP> Do no touch encrypted files
.*\.encrypted|
# Files and folders generated by bots, to avoid loops
^setup/|/static/description/index\.html$|
# We don't want to mess with tool-generated files
Expand All @@ -13,6 +15,10 @@ exclude: |
/static/(src/)?lib/|
# Repos using Sphinx to generate docs don't need prettying
^docs/_templates/.*\.html$|
# Don't bother non-technical authors with formatting issues in docs
readme/.*\.(rst|md)$|
# Ignore build and dist directories in addons
/build/|/dist/|
# You don't usually want a bot to modify your legal texts
(LICENSE.*|COPYING.*)
default_language_version:
Expand All @@ -34,13 +40,17 @@ repos:
language: fail
files: '[a-zA-Z0-9_]*/i18n/en\.po$'
- repo: https://github.com/oca/maintainer-tools
rev: ab1d7f6
rev: 969238e47c07d0c40573acff81d170f63245d738
hooks:
# update the NOT INSTALLABLE ADDONS section above
- id: oca-update-pre-commit-excluded-addons
- id: oca-fix-manifest-website
args: ["https://github.com/grap/grap-odoo-custom"]

- repo: https://github.com/OCA/odoo-pre-commit-hooks
rev: v0.0.25
hooks:
- id: oca-checks-odoo-module
- id: oca-checks-po
- repo: https://github.com/myint/autoflake
rev: v1.4
hooks:
Expand Down
2 changes: 1 addition & 1 deletion grap_change_email/data/mail_data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>

<template id="template_grap_change_mail" inherit_id="mail.mail_notification_paynow">
<template id="template_grap_change_mail" inherit_id="mail.mail_notification_paynow" priority="1000">

<!-- delete "Best regards" automatically added -->
<xpath expr="//tr[2]//div[2]" position="replace">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from openupgradelib import openupgrade

# pylint: disable=odoo-addons-relative-import
from odoo.addons.grap_change_translation import preserve_translation


Expand Down
8 changes: 4 additions & 4 deletions grap_change_views_mrp/views/view_mrp_bom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
<notebook>
<page string="Components (admin)" groups="base.group_no_one">
<field name="bom_line_ids" widget="one2many_list" context="{'default_parent_product_tmpl_id': product_tmpl_id}">
<tree string="Components" editable="bottom">
<tree editable="bottom">
<field name="sequence" widget="handle"/>
<!-- mrp_bom_line_has_bom -->
<field name="has_bom" invisible="1"/>
Expand Down Expand Up @@ -203,7 +203,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
</page>
<page string="Components">
<field name="bom_line_with_sectionnote_ids" widget="section_and_note_one2many" context="{'default_parent_product_tmpl_id': product_tmpl_id}">
<tree string="Components" editable="bottom">
<tree editable="bottom">
<control>
<create name="add_product_control" string="Add a product"/>
<create name="add_section_control" string="Add a section" context="{'default_display_type': 'line_section'}"/>
Expand Down Expand Up @@ -340,7 +340,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
<record id="view_mrp_bom_tree_grap_handle_price_sale_nok" model="ir.ui.view">
<field name="model">mrp.bom</field>
<field name="arch" type="xml">
<tree string="Bills of Materials Intermediate - Handling Prices" default_order="priority desc, product_id" decoration-warning="diff_product_bom_standard_price != 0">
<tree default_order="priority desc, product_id" decoration-warning="diff_product_bom_standard_price != 0">
<!-- odoo code -->
<field name="code" string="Reference"/>
<field name="product_tmpl_id" groups="base.group_no_one" string="Product template (admin)"/>
Expand All @@ -362,7 +362,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
<record id="view_mrp_bom_tree_grap_handle_price" model="ir.ui.view">
<field name="model">mrp.bom</field>
<field name="arch" type="xml">
<tree string="Bills of Materials - Handling Prices" default_order="priority desc, product_id" decoration-warning="diff_product_bom_standard_price != 0">
<tree default_order="priority desc, product_id" decoration-warning="diff_product_bom_standard_price != 0">
<!-- odoo code -->
<field name="code" string="Reference"/>
<field name="product_tmpl_id" groups="base.group_no_one" string="Product template (admin)"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<record id="view_account_bank_statement_line_tree" model="ir.ui.view">
<field name="model">account.bank.statement.line</field>
<field name="arch" type="xml">
<tree string="Cash register operations" create="false" delete="false">
<tree create="false" delete="false">
<field name="date"/>
<field name="name"/>
<field name="partner_id"/>
Expand Down
6 changes: 5 additions & 1 deletion grap_change_views_pos/views/view_pos_order_line.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
<field name="model">pos.order.line</field>
<field name="priority" eval="15"/>
<field name="arch" type="xml">
<tree colors="blue:state == 'draft';gray:state in ('done','cancel');black:state not in('done','cancel')" create="false" delete="false">
<tree
decoration-info="state == 'draft'"
decoration-muted="state in ('done','cancel')"
create="false" delete="false">
<field name="create_date"/>
<field name="partner_id"/>
<field name="product_id"/>
Expand All @@ -24,6 +27,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
<field name="margin_percent"/>
<field name="price_subtotal" sum="Total Excl"/>
<field name="price_subtotal_incl" sum="Total Incl"/>
<field name="state" invisible="1"/>
</tree>
</field>
</record>
Expand Down
6 changes: 3 additions & 3 deletions grap_change_views_product/views/view_product_product_tree.xml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
<record id="view_product_product_tree_pricetag" model="ir.ui.view">
<field name="model">product.product</field>
<field name="arch" type="xml">
<tree editable="bottom" string="Products (Price Tags)" create="false">
<tree editable="bottom" create="false">
<field name="default_code" readonly="1"/>
<button name="see_current_product" type="object" string="↗️"/>
<field name="name" readonly="1"/>
Expand Down Expand Up @@ -211,7 +211,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
<record id="view_product_product_tree_category" model="ir.ui.view">
<field name="model">product.product</field>
<field name="arch" type="xml">
<tree editable="bottom" string="Products (Categories)" create="false">
<tree editable="bottom" create="false">
<field name="default_code" readonly="1"/>
<button name="see_current_product" type="object" string="↗️"/>
<field name="name" readonly="1"/>
Expand Down Expand Up @@ -250,7 +250,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
<record id="view_product_product_tree_alcohol" model="ir.ui.view">
<field name="model">product.product</field>
<field name="arch" type="xml">
<tree editable="bottom" string="Products (Alcohol)" create="false">
<tree editable="bottom" create="false">
<field name="default_code" readonly="1"/>
<button name="see_current_product" type="object" string="↗️"/>
<field name="name" readonly="1"/>
Expand Down
2 changes: 1 addition & 1 deletion grap_qweb_report/report/qweb_template_account_invoice.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>

<template id="template_account_invoice" inherit_id="account.report_invoice_document">
<template id="template_account_invoice" inherit_id="account.report_invoice_document" priority="1000">

<!-- Add Custom Message -->
<xpath expr="//div[hasclass('page')]/h2/.." position="before">
Expand Down
2 changes: 1 addition & 1 deletion grap_qweb_report/report/qweb_template_layout_standard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
<odoo>


<template id="grap_external_layout" inherit_id="web.external_layout_standard">
<template id="grap_external_layout" inherit_id="web.external_layout_standard" priority="1000">
<!-- -->
<!--Overwrite header -->
<!-- -->
Expand Down
2 changes: 1 addition & 1 deletion grap_qweb_report/report/qweb_template_purchase_order.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>

<template id="template_purchaseorder" inherit_id="purchase.report_purchaseorder_document">
<template id="template_purchaseorder" inherit_id="purchase.report_purchaseorder_document" priority="1000">

<!-- Add Custom Message -->
<xpath expr="//div[hasclass('page')]/h2/.." position="before">
Expand Down
2 changes: 1 addition & 1 deletion grap_qweb_report/report/qweb_template_stock_picking.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
</xpath>
</template>

<template id="template_stock_delivery" inherit_id="stock.report_delivery_document">
<template id="template_stock_delivery" inherit_id="stock.report_delivery_document" priority="1000">

<!-- Add Custom Message -->
<xpath expr="//div[hasclass('page')]/h2/.." position="before">
Expand Down

0 comments on commit e692b56

Please sign in to comment.