Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
4482 Visualizzazioni

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

Avatar
Abbandona

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

Autore

Oh sorry, I am using Odoo 12 CE.

Autore

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.

Post correlati Risposte Visualizzazioni Attività
4
dic 17
5474
1
ago 25
399
1
lug 25
385
2
lug 25
568
1
lug 25
518