Port base_usability, sale_usability, sale_stock_usability to v10

This commit is contained in:
Alexis de Lattre
2016-10-27 09:33:15 +02:00
parent 9e37c6e1ae
commit 42233bc0ce
23 changed files with 164 additions and 474 deletions

View File

@@ -1,24 +1,7 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Stock Usability module for Odoo
# Copyright (C) 2014-2015 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
# © 2014-2016 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
@@ -48,5 +31,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'procurement_view.xml',
'security/ir.model.access.csv',
],
'installable': False,
'installable': True,
}

View File

@@ -1,27 +1,10 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Stock Usability module for Odoo
# Copyright (C) 2014-2016 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
# © 2014-2016 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import models, fields, api
import openerp.addons.decimal_precision as dp
from odoo import models, fields, api
import odoo.addons.decimal_precision as dp
import logging
logger = logging.getLogger(__name__)
@@ -121,3 +104,10 @@ class StockIncoterms(models.Model):
for inco in self:
res.append((inco.id, u'[%s] %s' % (inco.code, inco.name)))
return res
class ProcurementGroup(models.Model):
_inherit = 'procurement.group'
picking_ids = fields.One2many(
'stock.picking', 'group_id', string='Pickings', readonly=True)

View File

@@ -284,5 +284,18 @@ in the quantities for his reception -->
<field name="view_id" ref="stock.view_move_tree"/>
</record>
<record id="procurement_group_form_view" model="ir.ui.view">
<field name="name">stock_usability.procurement.group.form</field>
<field name="model">procurement.group</field>
<field name="inherit_id" ref="procurement.procurement_group_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='move_type']/.." position="after">
<group name="picking" string="Pickings">
<field name="picking_ids" nolabel="1"/>
</group>
</xpath>
</field>
</record>
</data>
</openerp>