Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
4517 Представления

I am having these codes:

```

class PurchaseOrder(models.Model):
_inherit = 'purchase.order'



state = fields.Selection(selection_add=[

('approved_finance', 'Approved By Finance Manager'),

('approved_manager', 'Approved By Manager'),

])


@api.constrains('partner_ref')

def _hello_world(self):

raise Warning('Hello World')

```


I am looking at this article: https://aasimania.wordpress.com/2011/12/11/inheriting-workflows-in-openerp/. Looking there, I need to define workflow.activity and workflow.transition. How can I inherit the workflow.transition that already available for model purchase.order?

```

<record id=”trans_act_draft_approval” model=”workflow.transition”>

<field name=”act_from” ref=”sale.act_draft”/>

<field name=”act_to” ref=”act_approval”/>

<field name=”signal”>confirm_approve</field>

</record>

```


How can I have any information on sale.act_draft, for example (especially for what are there for purchase.order)?


EDIT 1: I am using Odoo 12 CE

Аватар
Отменить

which odoo version are you using ? For new API we don't need to define workflow and transitions.

Автор

Oh sorry, I am using Odoo 12 CE.

Автор

Found the solution here: https://www.youtube.com/watch?v=lPHWsw3Iclk. Good video, people coming by looking for an answer from related topic better look at this YouTube video.

Related Posts Ответы Просмотры Активность
4
дек. 17
5532
1
авг. 25
449
1
июл. 25
426
2
июл. 25
624
1
июл. 25
564