Port base_usability, sale_usability, sale_stock_usability to v10
This commit is contained in:
@@ -1,24 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Sale Stock Usability module for Odoo
|
||||
# Copyright (C) 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
# © 2015-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).
|
||||
|
||||
|
||||
{
|
||||
@@ -42,5 +25,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
|
||||
'website': 'http://www.akretion.com',
|
||||
'depends': ['sale_stock'],
|
||||
'data': ['sale_stock_view.xml'],
|
||||
'installable': False,
|
||||
'installable': True,
|
||||
}
|
||||
|
||||
@@ -1,24 +1,7 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Sale Usability Extension module for Odoo
|
||||
# Copyright (C) 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2015-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
|
||||
|
||||
@@ -28,25 +11,3 @@ class SaleOrder(models.Model):
|
||||
|
||||
warehouse_id = fields.Many2one(track_visibility='onchange')
|
||||
incoterm = fields.Many2one(track_visibility='onchange')
|
||||
|
||||
|
||||
class SaleOrderLine(models.Model):
|
||||
_inherit = 'sale.order.line'
|
||||
|
||||
# The sale_stock module defines the field product_tmpl_id as related
|
||||
# field without readonly=True, which causes some access right issues
|
||||
# when you change the product on a sale.order.line and you don't have
|
||||
# write access on product.product
|
||||
product_tmpl_id = fields.Many2one(
|
||||
'product.template', related='product_id.product_tmpl_id',
|
||||
string='Product Template', readonly=True)
|
||||
|
||||
|
||||
class ProcurementGroup(models.Model):
|
||||
_inherit = 'procurement.group'
|
||||
|
||||
sale_ids = fields.One2many(
|
||||
'sale.order', 'procurement_group_id', string='Sale Orders',
|
||||
readonly=True)
|
||||
picking_ids = fields.One2many(
|
||||
'stock.picking', 'group_id', string='Pickings', readonly=True)
|
||||
|
||||
@@ -1,26 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--
|
||||
Copyright (C) 2015 Akretion (http://www.akretion.com/)
|
||||
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
The licence is in the file __openerp__.py
|
||||
© 2015-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).
|
||||
-->
|
||||
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
|
||||
<record id="view_picking_internal_search_inherit" model="ir.ui.view">
|
||||
<field name="name">sale_stock_usability.picking.search</field>
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="inherit_id" ref="sale_stock.view_picking_internal_search_inherit" />
|
||||
<field name="arch" type="xml">
|
||||
<filter name="to_invoice" position="attributes">
|
||||
<attribute name="domain">[('invoice_state', '=', '2binvoiced'), ('state', '=', 'done')]</attribute>
|
||||
</filter>
|
||||
</field>
|
||||
</record>
|
||||
<odoo>
|
||||
|
||||
<!-- the truck icon is probably enough
|
||||
<record id="view_order_form_inherit" model="ir.ui.view">
|
||||
<field name="name">sale_stock_usability.sale_order_form</field>
|
||||
<field name="model">sale.order</field>
|
||||
@@ -33,23 +21,6 @@
|
||||
</notebook>
|
||||
</field>
|
||||
</record>
|
||||
-->
|
||||
|
||||
|
||||
<record id="procurement_group_form_view" model="ir.ui.view">
|
||||
<field name="name">sale_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="sale" string="Sale Orders">
|
||||
<field name="sale_ids" nolabel="1"/>
|
||||
</group>
|
||||
<group name="picking" string="Pickings">
|
||||
<field name="picking_ids" nolabel="1"/>
|
||||
</group>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user