Browse Source

[MIG] beesdoo_inventory: migrate to 12.0

pull/111/head
Samuel Degueldre 5 years ago
committed by Rémy Taymans
parent
commit
89174809c1
  1. 3
      beesdoo_inventory/__init__.py
  2. 11
      beesdoo_inventory/__manifest__.py
  3. 3
      beesdoo_inventory/models/__init__.py
  4. 3
      beesdoo_inventory/models/stock.py
  5. 44
      beesdoo_inventory/views/stock.xml

3
beesdoo_inventory/__init__.py

@ -1,2 +1 @@
# -*- coding: utf-8 -*-
import models
from . import models

11
beesdoo_inventory/__openerp__.py → beesdoo_inventory/__manifest__.py

@ -1,10 +1,9 @@
# -*- coding: utf-8 -*-
{ {
'name': "beesdoo_inventory",
'name': "Beesdoo Inventory",
'summary': """ 'summary': """
Modification of inventory data for the needs of beescoop
- SOO24 - Bon de livraison""",
Adds a responsible, a max shipping date and a button to copy quantity to
stock pickings.""",
'description': """ 'description': """
@ -17,7 +16,7 @@
# Check https://github.com/odoo/odoo/blob/master/openerp/addons/base/module/module_data.xml # Check https://github.com/odoo/odoo/blob/master/openerp/addons/base/module/module_data.xml
# for the full list # for the full list
'category': 'Sales Management', 'category': 'Sales Management',
'version': '9.0.1.0.0',
'version': '12.0.1.0.0',
# any module necessary for this one to work correctly # any module necessary for this one to work correctly
'depends': ['delivery', 'beesdoo_base'], 'depends': ['delivery', 'beesdoo_base'],
@ -28,4 +27,4 @@
# only loaded in demonstration mode # only loaded in demonstration mode
'demo': [], 'demo': [],
}
}

3
beesdoo_inventory/models/__init__.py

@ -1,2 +1 @@
# -*- coding: utf-8 -*-
import stock
from . import stock

3
beesdoo_inventory/models/stock.py

@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
from openerp import models, fields, api, _
from odoo import _, api, fields, models
class StockPicking(models.Model): class StockPicking(models.Model):
_inherit = 'stock.picking' _inherit = 'stock.picking'

44
beesdoo_inventory/views/stock.xml

@ -1,36 +1,34 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<odoo> <odoo>
<record model="ir.ui.view" id="beesdoo_stock_tree_view">
<field name="name">beesdoo.stock.tree.view</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.vpicktree" />
<field name="arch" type="xml">
<field name="partner_id" position="after">
<field name="responsible" />
</field>
</field>
</record>
<record model="ir.ui.view" id="beesdoo_stock_tree_view">
<field name="name">beesdoo.stock.tree.view</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.vpicktree" />
<field name="arch" type="xml">
<field name="partner_id" position="after">
<field name="responsible" />
</field>
</field>
</record>
<record model="ir.ui.view" id="beesdoo_stock_form_view">
<field name="name">beesdoo.stock.form.view</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.view_picking_form" />
<field name="arch" type="xml">
<field name="min_date" position="after">
<field name="max_shipping_date" placeholder="Max shipping date" />
</field>
<record model="ir.ui.view" id="beesdoo_stock_form_view">
<field name="name">beesdoo.stock.form.view</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.view_picking_form" />
<field name="arch" type="xml">
<field name="scheduled_date" position="after">
<field name="max_shipping_date" placeholder="Max shipping date" />
</field>
<field name="backorder_id" position="after"> <field name="backorder_id" position="after">
<field name="responsible" /> <field name="responsible" />
</field> </field>
<button name="do_new_transfer" position="before">
<button name="action_assign" position="after">
<button name="copy_qty" string="Copy Pack Quantity" states="partially_available,assigned" type="object" class="oe_highlight" <button name="copy_qty" string="Copy Pack Quantity" states="partially_available,assigned" type="object" class="oe_highlight"
attrs="{'invisible': ['|', ('picking_type_code', '!=', 'incoming')]}"/> attrs="{'invisible': ['|', ('picking_type_code', '!=', 'incoming')]}"/>
</button> </button>
<xpath expr="//field[@name='product_id']" position="attributes"> <xpath expr="//field[@name='product_id']" position="attributes">
<attribute name="domain">[('main_seller_id', '=', parent.partner_id)]</attribute> <attribute name="domain">[('main_seller_id', '=', parent.partner_id)]</attribute>
</xpath> </xpath>
</field>
</record>
</field>
</record>
</odoo> </odoo>
Loading…
Cancel
Save