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

Hi everyone

I try to create Sale Oder in module Sale directly when I click "Save" button in create Quotation form, it means I skip creating Quotation step when I click it. My system doesn't need "comfirm sale" button, because it creates a sale order directly, and I can hide this button.

I try changing "state" value in default from "draft" to "manual" in sale.py, but it doesn't work. So, How do I do it?

Help me, please

Thank you.

아바타
취소
베스트 답변

You will have to modify sale_order function for create to call the workflow:

wf_service.trg_validate(uid, 'sale.order', ids[0], 'order_confirm', cr)

That way creating a new quotation will automatically go through workflow and create a sale order.

아바타
취소
작성자 베스트 답변

Hi Mariusz Mizgier
I know your code, It same in function "action button confirm" and it set confirm for the quotation. But "sale_order" is a class, I cant found a function with name "sale_order" or I dont know which function create a quotation to add your code here.

And I will create a module to inherit "sale" module, so, How do I modify that function to create sale order directly

Please explain more for me, please!!!

Thank you so much!

아바타
취소

I've created a small module for you - check it out at https://drive.google.com/file/d/0B_0MqUxRHKNjVUdGdkRjdEFJbVk/edit?usp=sharing This overrides default create method then auto-confirms quotation to make it sale order. You can make some tweaks to hide buttons in form view.

Hi Mariusz Mizgier

received you module and it worked. Thank you so much, you are very kind.
Thank you again! 

2014-08-01 17:16 GMT+07:00 Mariusz Mizgier <mariusz.mizgier@currenda.pl>:

I've created a small module for you - check it out at https://drive.google.com/file/d/0B_0MqUxRHKNjVUdGdkRjdEFJbVk/edit?usp=sharing This overrides default create method then auto-confirms quotation to make it sale order. You can make some tweaks to hide buttons in form view.

--
Mariusz Mizgier Sent by OpenERP S.A. using Odoo. Access your messages and documents in Odoo



--
Trần Như Văn
MSSV: 51104177
K11 Bách Khoa Tp.HCM
Khoa: Khoa học và Kĩ thuật máy tính

That's great to hear, if you can be so kind and mark the question as solved that would be great ;)

Hi Mariusz Mizgier

I have a little problem. That is modifying a function, which return default value of a column. I'm very glad if you help me, please!
I wrote "super(<my_class>, self).<my_function>(cr, uid, context)" in the function content, but it didn't override the function I want. So, when I run openERP, in module "Warehouse" and create a "Incoming Products", the Location have been changed value default as i override, but after that, it return old default value

Thank you so much.

--
Trần Như Văn
MSSV: 51104177
K11 Bách Khoa Tp.HCM
Khoa: Khoa học và Kĩ thuật máy tính
관련 게시물 답글 화면 활동
0
10월 24
1008
0
3월 15
4582
0
4월 24
1421
2
12월 15
4416
1
12월 15
3849