From d99f696ceed119fce2a68cdea358fe22de897e07 Mon Sep 17 00:00:00 2001 From: janikvonrotz Date: Fri, 6 May 2022 17:06:49 +0200 Subject: [PATCH] sync from 14.0 --- .vuepress/config.js | 4 +- scripts/odoo15_server_cron_patch | 34 ++++++++++ snippets.md | 62 +++++++++++++++++++ ...t.agreement_type_form_view.hide_domain.xml | 6 ++ ...reement_form_view.description_optional.xml | 10 +++ ...r_agreement_form_view.hide_description.xml | 6 ++ ...rtner_agreement_form_view.hide_parties.xml | 14 +++++ ...rtner_agreement_list_view.replace_tree.xml | 18 ++++++ ...t_template_only_form_view.hide_barcode.xml | 8 +++ ...ct_variant_easy_edit_view.hide_barcode.xml | 8 +++ ...elivery_kit_sections.sequence_in_table.xml | 8 +++ task | 2 + 12 files changed, 179 insertions(+), 1 deletion(-) create mode 100755 scripts/odoo15_server_cron_patch create mode 100644 snippets/agreement.agreement_type_form_view.hide_domain.xml create mode 100644 snippets/agreement_legal.partner_agreement_form_view.description_optional.xml create mode 100644 snippets/agreement_legal.partner_agreement_form_view.hide_description.xml create mode 100644 snippets/agreement_legal.partner_agreement_form_view.hide_parties.xml create mode 100644 snippets/agreement_legal.partner_agreement_list_view.replace_tree.xml create mode 100644 snippets/product.product_template_only_form_view.hide_barcode.xml create mode 100644 snippets/product.product_variant_easy_edit_view.hide_barcode.xml create mode 100644 snippets/stock.stock_report_delivery_kit_sections.sequence_in_table.xml diff --git a/.vuepress/config.js b/.vuepress/config.js index 7a4d08fa..3d6fa880 100644 --- a/.vuepress/config.js +++ b/.vuepress/config.js @@ -5,6 +5,7 @@ module.exports = { ['link', { rel: "icon", type: "image/png", href: "icon.png"}], ], themeConfig: { + logo: '/icon.png', sidebar: 'auto', repo: 'mint-system/odoo-development', docsBranch: '14.0', @@ -12,7 +13,8 @@ module.exports = { nav: [ { text: 'Home', link: '/' }, { text: 'Help', link: '/task' }, - { text: 'Snippets', link: '/snippets' } + { text: 'Snippets', link: '/snippets' }, + { text: 'Mint System', link: 'https://www.mint-system.ch' } ], }, dest: 'public', diff --git a/scripts/odoo15_server_cron_patch b/scripts/odoo15_server_cron_patch new file mode 100755 index 00000000..7fee4c9b --- /dev/null +++ b/scripts/odoo15_server_cron_patch @@ -0,0 +1,34 @@ +#!/bin/bash + +# Get script name +SCRIPT=$(basename "$0") + +# First param is docker container +CONTAINER=$1 + +# Default configuration +PACKAGE_PATH="/usr/lib/python3/dist-packages/" + +# Custom configuration +FILE_PATH="${PACKAGE_PATH}odoo/service/server.py" +FIND="for db_name, registry in registries.d.items()" +REPLACE="for db_name, registry in registries.d.copy().items()" + +# Get filename +FILE=`basename "$FILE_PATH"` + +# Copy from docker +docker cp "$CONTAINER":"$FILE_PATH" . + +# Find and replace +sed -i'' "s/$FIND/$REPLACE/g" $FILE + +# Copy back to docker +docker cp $FILE "$CONTAINER":"$FILE_PATH" + +# Remove file +rm -f $FILE + +# Register patch installation +echo "Patch $SCRIPT applied." +touch "/etc/odoo/${SCRIPT}_${CONTAINER}_installed" diff --git a/snippets.md b/snippets.md index af5da185..c8f6f0f1 100644 --- a/snippets.md +++ b/snippets.md @@ -170,6 +170,11 @@ Report: report_invoice_document_with_payments ID: `mint_system.account.report_invoice_document_with_payments.add_iban_and_bank` Link: [snippets/account.report_invoice_document_with_payments.add_iban_and_bank.xml](https://github.com/Mint-System/Odoo-Development/tree/14.0/snippets/account.report_invoice_document_with_payments.add_iban_and_bank.xml) +### add discount date +Report: view_in_invoice_tree +ID: `mint_system.account.view_in_invoice_tree.add_discount_date` +Link: [snippets/account.view_in_invoice_tree.add_discount_date.xml](https://github.com/Mint-System/Odoo-Development/tree/14.0/snippets/account.view_in_invoice_tree.add_discount_date.xml) + ### x account codes Report: view_invoice_tree ID: `mint_system.account.view_invoice_tree.x_account_codes` @@ -220,12 +225,38 @@ Report: view_out_invoice_tree ID: `mint_system.account.view_out_invoice_tree.show_partner_shipping` Link: [snippets/account.view_out_invoice_tree.show_partner_shipping.xml](https://github.com/Mint-System/Odoo-Development/tree/14.0/snippets/account.view_out_invoice_tree.show_partner_shipping.xml) +## Agreement +### hide domain +Report: agreement_type_form_view +ID: `mint_system.agreement.agreement_type_form_view.hide_domain` +Link: [snippets/agreement.agreement_type_form_view.hide_domain.xml](https://github.com/Mint-System/Odoo-Development/tree/14.0/snippets/agreement.agreement_type_form_view.hide_domain.xml) + ## Agreement Legal +### description optional +Report: partner_agreement_form_view +ID: `mint_system.agreement_legal.partner_agreement_form_view.description_optional` +Link: [snippets/agreement_legal.partner_agreement_form_view.description_optional.xml](https://github.com/Mint-System/Odoo-Development/tree/14.0/snippets/agreement_legal.partner_agreement_form_view.description_optional.xml) + +### hide description +Report: partner_agreement_form_view +ID: `mint_system.agreement_legal.partner_agreement_form_view.hide_description` +Link: [snippets/agreement_legal.partner_agreement_form_view.hide_description.xml](https://github.com/Mint-System/Odoo-Development/tree/14.0/snippets/agreement_legal.partner_agreement_form_view.hide_description.xml) + +### hide parties +Report: partner_agreement_form_view +ID: `mint_system.agreement_legal.partner_agreement_form_view.hide_parties` +Link: [snippets/agreement_legal.partner_agreement_form_view.hide_parties.xml](https://github.com/Mint-System/Odoo-Development/tree/14.0/snippets/agreement_legal.partner_agreement_form_view.hide_parties.xml) + ### hide special terms Report: partner_agreement_form_view ID: `mint_system.agreement_legal.partner_agreement_form_view.hide_special_terms` Link: [snippets/agreement_legal.partner_agreement_form_view.hide_special_terms.xml](https://github.com/Mint-System/Odoo-Development/tree/14.0/snippets/agreement_legal.partner_agreement_form_view.hide_special_terms.xml) +### replace tree +Report: partner_agreement_list_view +ID: `mint_system.agreement_legal.partner_agreement_list_view.replace_tree` +Link: [snippets/agreement_legal.partner_agreement_list_view.replace_tree.xml](https://github.com/Mint-System/Odoo-Development/tree/14.0/snippets/agreement_legal.partner_agreement_list_view.replace_tree.xml) + ## Base ### remove domain widget Report: ir_filters_view_form @@ -485,6 +516,12 @@ Report: hr_payroll_report_view ID: `mint_system.gio_payroll_custom.hr_payroll_report_view.new_report` Link: [snippets/gio_payroll_custom.hr_payroll_report_view.new_report.xml](https://github.com/Mint-System/Odoo-Development/tree/14.0/snippets/gio_payroll_custom.hr_payroll_report_view.new_report.xml) +## Hr Attendance +### enable edit +Report: view_attendance_tree +ID: `mint_system.hr_attendance.view_attendance_tree.enable_edit` +Link: [snippets/hr_attendance.view_attendance_tree.enable_edit.xml](https://github.com/Mint-System/Odoo-Development/tree/14.0/snippets/hr_attendance.view_attendance_tree.enable_edit.xml) + ## Hr Holidays Calendar ### view color Report: hr_leave_report_calendar_timeline @@ -1031,6 +1068,11 @@ Report: product_template_kanban_view ID: `mint_system.product.product_template_kanban_view.add_product_info` Link: [snippets/product.product_template_kanban_view.add_product_info.xml](https://github.com/Mint-System/Odoo-Development/tree/14.0/snippets/product.product_template_kanban_view.add_product_info.xml) +### hide barcode +Report: product_template_only_form_view +ID: `mint_system.product.product_template_only_form_view.hide_barcode` +Link: [snippets/product.product_template_only_form_view.hide_barcode.xml](https://github.com/Mint-System/Odoo-Development/tree/14.0/snippets/product.product_template_only_form_view.hide_barcode.xml) + ### hide default code Report: product_template_only_form_view ID: `mint_system.product.product_template_only_form_view.hide_default_code` @@ -1076,6 +1118,11 @@ Report: product_template_tree_view ID: `mint_system.product.product_template_tree_view.set_default_order` Link: [snippets/product.product_template_tree_view.set_default_order.xml](https://github.com/Mint-System/Odoo-Development/tree/14.0/snippets/product.product_template_tree_view.set_default_order.xml) +### hide barcode +Report: product_variant_easy_edit_view +ID: `mint_system.product.product_variant_easy_edit_view.hide_barcode` +Link: [snippets/product.product_variant_easy_edit_view.hide_barcode.xml](https://github.com/Mint-System/Odoo-Development/tree/14.0/snippets/product.product_variant_easy_edit_view.hide_barcode.xml) + ### trimada Report: report_producttemplatelabel ID: `mint_system.product.report_producttemplatelabel.trimada` @@ -2515,11 +2562,26 @@ Report: view_move_form ID: `mint_system.stock.view_move_form.enable_edit_and_create` Link: [snippets/stock.view_move_form.enable_edit_and_create.xml](https://github.com/Mint-System/Odoo-Development/tree/14.0/snippets/stock.view_move_form.enable_edit_and_create.xml) +### show immediate transfer +Report: view_move_form +ID: `mint_system.stock.view_move_form.show_immediate_transfer` +Link: [snippets/stock.view_move_form.show_immediate_transfer.xml](https://github.com/Mint-System/Odoo-Development/tree/14.0/snippets/stock.view_move_form.show_immediate_transfer.xml) + +### show locations +Report: view_move_form +ID: `mint_system.stock.view_move_form.show_locations` +Link: [snippets/stock.view_move_form.show_locations.xml](https://github.com/Mint-System/Odoo-Development/tree/14.0/snippets/stock.view_move_form.show_locations.xml) + ### show move lines Report: view_move_form ID: `mint_system.stock.view_move_form.show_move_lines` Link: [snippets/stock.view_move_form.show_move_lines.xml](https://github.com/Mint-System/Odoo-Development/tree/14.0/snippets/stock.view_move_form.show_move_lines.xml) +### show partner +Report: view_move_form +ID: `mint_system.stock.view_move_form.show_partner` +Link: [snippets/stock.view_move_form.show_partner.xml](https://github.com/Mint-System/Odoo-Development/tree/14.0/snippets/stock.view_move_form.show_partner.xml) + ### show quantity done Report: view_move_form ID: `mint_system.stock.view_move_form.show_quantity_done` diff --git a/snippets/agreement.agreement_type_form_view.hide_domain.xml b/snippets/agreement.agreement_type_form_view.hide_domain.xml new file mode 100644 index 00000000..bc5b101b --- /dev/null +++ b/snippets/agreement.agreement_type_form_view.hide_domain.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/snippets/agreement_legal.partner_agreement_form_view.description_optional.xml b/snippets/agreement_legal.partner_agreement_form_view.description_optional.xml new file mode 100644 index 00000000..047954a7 --- /dev/null +++ b/snippets/agreement_legal.partner_agreement_form_view.description_optional.xml @@ -0,0 +1,10 @@ + + + + + False + + + + + \ No newline at end of file diff --git a/snippets/agreement_legal.partner_agreement_form_view.hide_description.xml b/snippets/agreement_legal.partner_agreement_form_view.hide_description.xml new file mode 100644 index 00000000..b282235d --- /dev/null +++ b/snippets/agreement_legal.partner_agreement_form_view.hide_description.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/snippets/agreement_legal.partner_agreement_form_view.hide_parties.xml b/snippets/agreement_legal.partner_agreement_form_view.hide_parties.xml new file mode 100644 index 00000000..b465374d --- /dev/null +++ b/snippets/agreement_legal.partner_agreement_form_view.hide_parties.xml @@ -0,0 +1,14 @@ + + + + + 1 + + + + + + + + + \ No newline at end of file diff --git a/snippets/agreement_legal.partner_agreement_list_view.replace_tree.xml b/snippets/agreement_legal.partner_agreement_list_view.replace_tree.xml new file mode 100644 index 00000000..71020e60 --- /dev/null +++ b/snippets/agreement_legal.partner_agreement_list_view.replace_tree.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/snippets/product.product_template_only_form_view.hide_barcode.xml b/snippets/product.product_template_only_form_view.hide_barcode.xml new file mode 100644 index 00000000..08154793 --- /dev/null +++ b/snippets/product.product_template_only_form_view.hide_barcode.xml @@ -0,0 +1,8 @@ + + + + + base.group_erp_manager + + + \ No newline at end of file diff --git a/snippets/product.product_variant_easy_edit_view.hide_barcode.xml b/snippets/product.product_variant_easy_edit_view.hide_barcode.xml new file mode 100644 index 00000000..719f6675 --- /dev/null +++ b/snippets/product.product_variant_easy_edit_view.hide_barcode.xml @@ -0,0 +1,8 @@ + + + + + base.group_erp_manager + + + \ No newline at end of file diff --git a/snippets/stock.stock_report_delivery_kit_sections.sequence_in_table.xml b/snippets/stock.stock_report_delivery_kit_sections.sequence_in_table.xml new file mode 100644 index 00000000..7bdadfed --- /dev/null +++ b/snippets/stock.stock_report_delivery_kit_sections.sequence_in_table.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/task b/task index 51cada00..a576ab1a 100755 --- a/task +++ b/task @@ -98,6 +98,8 @@ function install-native() { pip install git+https://github.com/OCA/openupgradelib.git@master#egg=openupgradelib echo "Install addon dependencies" pip install prometheus_client + echo "Install edi dependencies" + pip install pyzbar numpy pdf2image opencv-python } function open-url-with-delay(){