Port base_usability, sale_usability, sale_stock_usability to v10
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import sale
|
||||
from . import account_invoice
|
||||
|
||||
@@ -1,25 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Sale 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).
|
||||
|
||||
{
|
||||
'name': 'Sale Usability',
|
||||
@@ -44,5 +26,5 @@ Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for
|
||||
'data': [
|
||||
'sale_view.xml',
|
||||
],
|
||||
'installable': False,
|
||||
'installable': True,
|
||||
}
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
# -*- coding: 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp import models, fields
|
||||
|
||||
|
||||
class AccountInvoiceLine(models.Model):
|
||||
_inherit = 'account.invoice.line'
|
||||
|
||||
# reverse of the native M2M invoice_lines field on sale.order.line
|
||||
sale_line_ids = fields.Many2many(
|
||||
'sale.order.line', 'sale_order_line_invoice_rel', 'invoice_id',
|
||||
'order_line_id', 'Sale Order Lines', readonly=True)
|
||||
@@ -1,32 +1,13 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Sale Usability Extension module for Odoo
|
||||
# -*- coding: utf-8 -*-
|
||||
# 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp import models, fields
|
||||
from odoo import models, fields
|
||||
|
||||
|
||||
class SaleOrder(models.Model):
|
||||
_inherit = 'sale.order'
|
||||
|
||||
state = fields.Selection(track_visibility='onchange')
|
||||
date_order = fields.Datetime(track_visibility='onchange')
|
||||
date_confirm = fields.Date(track_visibility='onchange')
|
||||
client_order_ref = fields.Char(track_visibility='onchange')
|
||||
@@ -34,7 +15,13 @@ class SaleOrder(models.Model):
|
||||
partner_shipping_id = fields.Many2one(track_visibility='onchange')
|
||||
partner_invoice_id = fields.Many2one(track_visibility='onchange')
|
||||
pricelist_id = fields.Many2one(track_visibility='onchange')
|
||||
order_policy = fields.Selection(track_visibility='onchange')
|
||||
payment_term = fields.Many2one(track_visibility='onchange')
|
||||
fiscal_position = fields.Many2one(track_visibility='onchange')
|
||||
user_id = fields.Many2one(track_visibility='onchange')
|
||||
payment_term_id = fields.Many2one(track_visibility='onchange')
|
||||
fiscal_position_id = fields.Many2one(track_visibility='onchange')
|
||||
|
||||
|
||||
class ProcurementGroup(models.Model):
|
||||
_inherit = 'procurement.group'
|
||||
|
||||
sale_ids = fields.One2many(
|
||||
'sale.order', 'procurement_group_id', string='Sale Orders',
|
||||
readonly=True)
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
<?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>
|
||||
<odoo>
|
||||
|
||||
<record id="view_order_form" model="ir.ui.view">
|
||||
<field name="name">usability.sale.order.form</field>
|
||||
@@ -18,11 +17,7 @@
|
||||
<field name="invoice_ids" nolabel="1" context="{'form_view_ref': 'account.invoice_form'}"/>
|
||||
</page>
|
||||
</notebook>
|
||||
<field name="date_order" position="after">
|
||||
<field name="date_confirm"
|
||||
attrs="{'invisible': [('state', 'in', ('draft', 'sent'))]}"/>
|
||||
</field>
|
||||
<field name="fiscal_position" position="attributes">
|
||||
<field name="fiscal_position_id" position="attributes">
|
||||
<attribute name="widget">selection</attribute>
|
||||
</field>
|
||||
</field>
|
||||
@@ -34,10 +29,7 @@
|
||||
<field name="inherit_id" ref="sale.view_quotation_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="amount_total" position="before">
|
||||
<field name="amount_untaxed" sum="Total Untaxed"/>
|
||||
</field>
|
||||
<field name="amount_total" position="after">
|
||||
<field name="currency_id" groups="base.group_multi_currency"/>
|
||||
<field name="amount_untaxed" sum="Total Untaxed" widget="monetary"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
@@ -48,10 +40,7 @@
|
||||
<field name="inherit_id" ref="sale.view_order_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="amount_total" position="before">
|
||||
<field name="amount_untaxed" sum="Total Untaxed"/>
|
||||
</field>
|
||||
<field name="amount_total" position="after">
|
||||
<field name="currency_id" groups="base.group_multi_currency"/>
|
||||
<field name="amount_untaxed" sum="Total Untaxed" widget="monetary"/>
|
||||
</field>
|
||||
<field name="date_order" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
@@ -62,7 +51,16 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- TODO : handle date_confirm in search/graph views -->
|
||||
<record id="view_sales_order_filter" model="ir.ui.view">
|
||||
<field name="name">usability.sale.order.search</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_sales_order_filter"/>
|
||||
<field name="arch" type="xml">
|
||||
<filter context="{'group_by':'date_order'}" position="after">
|
||||
<filter string="Order Confirmation Month" name="confirmation_date_groupby" context="{'group_by': 'confirmation_date'}"/>
|
||||
</filter>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="procurement_form_view" model="ir.ui.view">
|
||||
<field name="name">procurement_usability.procurement.order.form</field>
|
||||
@@ -75,5 +73,17 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
<record id="procurement_group_form_view" model="ir.ui.view">
|
||||
<field name="name">sale_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>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user