Skip to content

Commit ac71861

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

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

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)