Browse Source

[MIG] beesdoo_purchase: migrate to v12.0

pull/114/head
Samuel Degueldre 5 years ago
committed by Rémy Taymans
parent
commit
a0e9bb015c
  1. 1
      beesdoo_purchase/__init__.py
  2. 3
      beesdoo_purchase/__manifest__.py
  3. 12
      beesdoo_purchase/migrations/9.0.1.1.0/post-migrate.py
  4. 5
      beesdoo_purchase/models/purchase.py
  5. 3
      beesdoo_purchase/models/purchase_order.py
  6. 4
      beesdoo_purchase/views/purchase_order.xml

1
beesdoo_purchase/__init__.py

@ -0,0 +1 @@
from . import models

3
beesdoo_purchase/__openerp__.py → beesdoo_purchase/__manifest__.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
{ {
'name': "Bees Purchase", 'name': "Bees Purchase",
@ -14,7 +13,7 @@
'website': "https://github.com/beescoop/Obeesdoo", 'website': "https://github.com/beescoop/Obeesdoo",
'category': 'Purchase', 'category': 'Purchase',
'version': '9.0.1.1.0',
'version': '12.0.1.1.0',
'depends': ['base', 'purchase', 'beesdoo_product'], 'depends': ['base', 'purchase', 'beesdoo_product'],

12
beesdoo_purchase/migrations/9.0.1.1.0/post-migrate.py

@ -1,12 +0,0 @@
# coding: utf-8
def migrate(cr, version):
"""Set the new supervisor_id field if this one is empty."""
cr.execute(
"""
UPDATE purchase_order
SET supervisor_id = create_uid
WHERE supervisor_id IS NULL OR supervisor_id = 1
"""
)

5
beesdoo_purchase/models/purchase.py

@ -1,7 +1,4 @@
# coding: utf-8
from openerp import api, fields, models
from odoo import api, fields, models
class PurchaseOrder(models.Model): class PurchaseOrder(models.Model):
_inherit = "purchase.order" _inherit = "purchase.order"

3
beesdoo_purchase/models/purchase_order.py

@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
from openerp import models, fields, api
from odoo import models, fields, api
class PurchaseOrder(models.Model): class PurchaseOrder(models.Model):

4
beesdoo_purchase/views/purchase_order.xml

@ -1,4 +1,4 @@
<openerp>
<odoo>
<data> <data>
<record model="ir.ui.view" id="beesdoo_purchase_order_form_view"> <record model="ir.ui.view" id="beesdoo_purchase_order_form_view">
<field name="name">beesdoo.purchase.order.form.view</field> <field name="name">beesdoo.purchase.order.form.view</field>
@ -36,4 +36,4 @@
</field> </field>
</record> </record>
</data> </data>
</openerp>
</odoo>
Loading…
Cancel
Save