콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
4160 화면

On our instance, the Sales Order (SO) has a button "View Delivery Order" in the upper left prior to actually delivery the products. You can quickly jump back and forth between these two forms using this button.

 

When we deliver the products, this button is removed from the SO. Is it possible to change a config and have this button remain even after they are delivered? Our Purchase Orders have the same behavior. Once an Incoming Shipment is received it will remove the View Incoming button from the PO.

 

I would like to keep this button in place forever because we do have to go back and sometimes view closed SOs and DOs/ POs and INs etc. Possible?

아바타
취소
베스트 답변

Yes.

The view that adds the View Delivery Order'button is sale.order.form.sale.stock (sale_stock.view_order_form_inherit)

The XML it uses to do this is:

<button name="action_view_delivery"

string="View Delivery Order"

type="object"

class="oe_highlight"

attrs="{'invisible': ['|','|','|',('picking_ids','=',False),('picking_ids','=',[]), ('state', 'not in', ('progress','manual')),('shipped','=',True)]}"

groups="base.group_user"/>

The invisible attribute sets the conditions under which the button is not visible.

You can remove one of the '|' (which represents OR) from the start of the attrs tag and remove ,('shipped','=',True) from the end via your own view which inherits and overrides this one to show this button even when the SO is delivered/shipped.

아바타
취소

Similar for purchases: Purchase Picking Inherited (purchase.purchase_order_2_stock_picking) and you want to change "states="approved" " to "states="approved,done""

관련 게시물 답글 화면 활동
4
2월 19
6495
2
2월 19
3189
0
3월 15
5108
2
5월 25
2417
1
1월 25
1717