From fb3e43264c19f93cfd1f4c8157e06bb0a32aa2e1 Mon Sep 17 00:00:00 2001
From: ps-tubtim
Date: Wed, 9 Sep 2020 10:37:19 +0700
Subject: [PATCH] [MIG] product_quick_bom: Migration to 13.0
---
product_quick_bom/README.rst | 11 ++--
product_quick_bom/models/product.py | 4 +-
product_quick_bom/readme/CONTRIBUTORS.rst | 1 +
.../static/description/index.html | 7 +--
product_quick_bom/views/product_view.xml | 53 +++++++++++++------
.../odoo/addons/product_quick_bom | 1 +
setup/product_quick_bom/setup.py | 6 +++
7 files changed, 57 insertions(+), 26 deletions(-)
create mode 120000 setup/product_quick_bom/odoo/addons/product_quick_bom
create mode 100644 setup/product_quick_bom/setup.py
diff --git a/product_quick_bom/README.rst b/product_quick_bom/README.rst
index 5a349e1a0..9196c5bc3 100644
--- a/product_quick_bom/README.rst
+++ b/product_quick_bom/README.rst
@@ -14,13 +14,13 @@ Product Quick Bom
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmanufacture-lightgray.png?logo=github
- :target: https://github.com/OCA/manufacture/tree/12.0/product_quick_bom
+ :target: https://github.com/OCA/manufacture/tree/13.0/product_quick_bom
:alt: OCA/manufacture
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/manufacture-12-0/manufacture-12-0-product_quick_bom
+ :target: https://translation.odoo-community.org/projects/manufacture-13-0/manufacture-13-0-product_quick_bom
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/129/12.0
+ :target: https://runbot.odoo-community.org/runbot/129/13.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -45,7 +45,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues `_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-`feedback `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -62,6 +62,7 @@ Contributors
* Sébastien Beau
* Kevin Khao
+* Pimolnat Suntian
Maintainers
~~~~~~~~~~~
@@ -87,6 +88,6 @@ Current `maintainers `__:
|maintainer-sebastienbeau| |maintainer-kevinkhao|
-This module is part of the `OCA/manufacture `_ project on GitHub.
+This module is part of the `OCA/manufacture `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/product_quick_bom/models/product.py b/product_quick_bom/models/product.py
index c67fa3e49..6dfa34586 100644
--- a/product_quick_bom/models/product.py
+++ b/product_quick_bom/models/product.py
@@ -16,9 +16,9 @@ class ProductTemplate(models.Model):
rec.bom_id = self.env["mrp.bom"]
bom_id = fields.Many2one(
- "mrp.bom",
+ comodel_name="mrp.bom",
string="Bill of Materials (quick access)",
- compute=_compute_bom_id,
+ compute="_compute_bom_id",
store=True,
)
diff --git a/product_quick_bom/readme/CONTRIBUTORS.rst b/product_quick_bom/readme/CONTRIBUTORS.rst
index ff1ec5950..0348cbe5c 100644
--- a/product_quick_bom/readme/CONTRIBUTORS.rst
+++ b/product_quick_bom/readme/CONTRIBUTORS.rst
@@ -1,2 +1,3 @@
* Sébastien Beau
* Kevin Khao
+* Pimolnat Suntian
diff --git a/product_quick_bom/static/description/index.html b/product_quick_bom/static/description/index.html
index cc6ef8468..edcee027b 100644
--- a/product_quick_bom/static/description/index.html
+++ b/product_quick_bom/static/description/index.html
@@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
This module was written to be able to quickly create the BoM for your product. There is a new “Bill of Materials” tab in the product form view that allows the user to add a BoM and its lines directly.
Beware that this functionality is relevant only when one product template has one Bill of Materials, and works only for product templates for simplicity’s sake.
Table of contents
@@ -392,7 +392,7 @@ ul.auto-toc {
Bugs are tracked on GitHub Issues.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-feedback.