Skip to Content
Menu
This question has been flagged
2 Replies
8251 Zobrazenia

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
Zrušiť
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
Zrušiť
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
Zrušiť
Related Posts Replies Zobrazenia Aktivita
0
okt 15
6640
0
apr 25
1504
0
jan 25
421
1
okt 24
815
0
júl 24
831