Skip to Content
Menú
This question has been flagged
2 Respostes
8236 Vistes

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
Descartar
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
Descartar
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
Descartar
Related Posts Respostes Vistes Activitat
0
d’oct. 15
6634
0
d’abr. 25
1473
0
de gen. 25
414
1
d’oct. 24
799
0
de jul. 24
777