Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
8253 Visualizzazioni

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
Abbandona
Risposta migliore
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
Abbandona
Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
ott 15
6641
0
apr 25
1508
0
gen 25
422
1
ott 24
822
0
lug 24
834