Skip to Content
Menu
This question has been flagged
2 Replies
8232 Views

Hi all

There is a button "accept & sign" even in draft quotation. But it's not possible to use this function before the quotation has been sent by email (error msg: Order is not in a state requiring customer signature.).

Is there a way to skip the "send by email" and directly sign and accept a draft quotation?


Thanks and BR

Kaj Maring

Avatar
Discard
Best Answer
has_to_be_signed(True)

just pass True as an argument in has_to_be_signed function

for odoo 15 /sale/controller/portal.py

there is method order_sudo.has_to_be_signed()

instead of that write order_sudo.has_to_be_signed(True)


Avatar
Discard
Best Answer

Hi,

You can inherit the sale.order model and make necessary changes in the function has_to_be_signed .

def has_to_be_signed(self, include_draft=False):
return (self.state == 'sent' or (self.state == 'draft' and include_draft)) and not self.is_expired and self.require_signature and not self.signature


Or you can inherit the template sale.sale_order_portal_template and remove the if condition from the button.


<a t-if="sale_order.has_to_be_signed(True)" role="button" class="btn btn-primary btn-block mb8" data-toggle="modal" data-target="#modalaccept" href="#">
<i class="fa fa-check"/><t t-if="sale_order.has_to_be_paid(True)"> Sign &amp; Pay</t><t t-else=""> Accept &amp; Sign</t>
</a>

Thanks

Avatar
Discard
Related Posts Replies Views Activity
0
Oct 15
6634
0
Apr 25
1471
0
Jan 25
413
1
Oct 24
795
0
Jul 24
773