Skip to content

Commit 6b0d20f

Browse files
committed
[ENH] purchase_isolated_rfq: add send email in rfq state
1 parent 1cd0c62 commit 6b0d20f

3 files changed

Lines changed: 15 additions & 13 deletions

File tree

.pre-commit-config.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ repos:
3333
language: fail
3434
files: '[a-zA-Z0-9_]*/i18n/en\.po$'
3535
- repo: https://github.com/oca/maintainer-tools
36-
rev: dfba427ba03900b69e0a7f2c65890dc48921d36a
36+
rev: 58557dd6b2c72e698dd2a0b4c5b435815e5d9d02
3737
hooks:
3838
# update the NOT INSTALLABLE ADDONS section above
3939
- id: oca-update-pre-commit-excluded-addons
4040
- id: oca-fix-manifest-website
4141
args: ["https://github.com/OCA/purchase-workflow"]
4242
- repo: https://github.com/myint/autoflake
43-
rev: v1.4
43+
rev: v2.2.0
4444
hooks:
4545
- id: autoflake
4646
args:
@@ -51,11 +51,11 @@ repos:
5151
- --remove-duplicate-keys
5252
- --remove-unused-variables
5353
- repo: https://github.com/psf/black
54-
rev: 22.3.0
54+
rev: 23.3.0
5555
hooks:
5656
- id: black
5757
- repo: https://github.com/pre-commit/mirrors-prettier
58-
rev: v2.4.1
58+
rev: v3.0.0-alpha.9-for-vscode
5959
hooks:
6060
- id: prettier
6161
name: prettier (with plugin-xml)
@@ -66,15 +66,15 @@ repos:
6666
- --plugin=@prettier/plugin-xml
6767
files: \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$
6868
- repo: https://github.com/pre-commit/mirrors-eslint
69-
rev: v7.32.0
69+
rev: v8.43.0
7070
hooks:
7171
- id: eslint
7272
verbose: true
7373
args:
7474
- --color
7575
- --fix
7676
- repo: https://github.com/pre-commit/pre-commit-hooks
77-
rev: v4.0.1
77+
rev: v4.4.0
7878
hooks:
7979
- id: trailing-whitespace
8080
# exclude autogenerated files
@@ -96,20 +96,20 @@ repos:
9696
- id: mixed-line-ending
9797
args: ["--fix=lf"]
9898
- repo: https://github.com/asottile/pyupgrade
99-
rev: v2.29.0
99+
rev: v3.7.0
100100
hooks:
101101
- id: pyupgrade
102102
args: ["--keep-percent-format"]
103103
- repo: https://github.com/PyCQA/isort
104-
rev: 5.9.3
104+
rev: 5.12.0
105105
hooks:
106106
- id: isort
107107
name: isort except __init__.py
108108
args:
109109
- --settings=.
110110
exclude: /__init__\.py$
111111
- repo: https://github.com/acsone/setuptools-odoo
112-
rev: 3.1.8
112+
rev: 3.1.12
113113
hooks:
114114
- id: setuptools-odoo-make-default
115115
- id: setuptools-odoo-get-requirements
@@ -119,13 +119,13 @@ repos:
119119
- --header
120120
- "# generated from manifests external_dependencies"
121121
- repo: https://github.com/PyCQA/flake8
122-
rev: 3.9.2
122+
rev: 6.0.0
123123
hooks:
124124
- id: flake8
125125
name: flake8
126126
additional_dependencies: ["flake8-bugbear==21.9.2"]
127127
- repo: https://github.com/OCA/pylint-odoo
128-
rev: 7.0.2
128+
rev: v8.0.19
129129
hooks:
130130
- id: pylint_odoo
131131
name: pylint with optional checks

purchase_isolated_rfq/models/purchase_order.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def action_convert_to_order(self):
6262
purchase_order.button_confirm()
6363
# Reference from this RFQ to Purchase Order
6464
self.purchase_order_id = purchase_order.id
65-
if self.state == "draft":
65+
if self.state in ["draft", "sent"]:
6666
self.button_done()
6767
return self.open_duplicated_purchase_order()
6868

purchase_isolated_rfq/views/purchase_views.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@
1414
name="quotation"
1515
attrs="{'invisible': [('order_sequence','=',True)]}"
1616
>
17+
<button name="action_rfq_send" states="draft" string="Send by Email" type="object" context="{'send_rfq':True}" class="oe_highlight" data-hotkey="g"/>
18+
<button name="action_rfq_send" states="sent" string="Re-Send by Email" type="object" context="{'send_rfq':True}" data-hotkey="g"/>
1719
<button
1820
name="action_convert_to_order"
19-
states="draft"
21+
states="draft,sent"
2022
class="oe_highlight"
2123
type="object"
2224
string="Convert to Order"

0 commit comments

Comments
 (0)