Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ

Hello Gurus,

I have a custom module where I need to easily track purchase orders raised for a job. I have a notebook sheet which displays links to related purchase orders and RFQs which works quite well. I want to enhance it by using the "create alternative" option which is loaded as part of the Purchase Agreements module. 

So, the situation is, if I duplicate the PO, all is good. 

In my module I inherit the purchase.orders and add my field:

job_id = fields.Many2one('jobs.jobs', string="Jobs", copy=True) 

My model has:

po_ids = fields.One2many('purchase.order', 'job_id', string="Purchase", copy=True)

If I use the Create Alternative, it does not carry across the id of the job across however, duplicating a PO does. I really want to have an easy way to cancel unsuccessful bidders that Create Alternatives provides.

I know I probably don't need the copy=True but, you know, trial and error and all that. 

Has anyone dealt with this before ? Got any tips?

As always, much appreciated!

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 7 25
516
1
thg 6 25
532
0
thg 9 23
1671
5
thg 2 25
5916
2
thg 12 24
1553