跳至内容
菜单
此问题已终结
2 回复
8254 查看

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

形象
丢弃
最佳答案
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)


形象
丢弃
最佳答案

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

形象
丢弃
相关帖文 回复 查看 活动
0
10月 15
6641
0
4月 25
1508
0
1月 25
422
1
10月 24
822
0
7月 24
835