Mig account_usability, sale_stock_usability, sale_usability, stock_usability
New module stock_account_usability
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import sale
|
||||
from . import account_invoice
|
||||
from . import product
|
||||
|
||||
@@ -1,19 +1,18 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2014-2016 Akretion (http://www.akretion.com)
|
||||
# Copyright 2014-2019 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',
|
||||
'version': '10.0.0.1.0',
|
||||
'version': '12.0.1.0.0',
|
||||
'category': 'Sales',
|
||||
'license': 'AGPL-3',
|
||||
'summary': 'Show invoices on sale orders',
|
||||
'summary': 'Usability improvements on sale module',
|
||||
'description': """
|
||||
Sale Usability Extension
|
||||
========================
|
||||
Sale Usability
|
||||
==============
|
||||
|
||||
Several small usability improvements:
|
||||
This module provides several small usability improvements on the official *sale* module:
|
||||
|
||||
* Display amount untaxed in tree view
|
||||
* TODO: update this list
|
||||
@@ -23,12 +22,14 @@ This module has been written by Alexis de Lattre from Akretion
|
||||
""",
|
||||
'author': 'Akretion',
|
||||
'website': 'http://www.akretion.com',
|
||||
'depends': ['sale'],
|
||||
'depends': [
|
||||
'sale',
|
||||
'base_view_inheritance_extension',
|
||||
],
|
||||
'data': [
|
||||
'sale_view.xml',
|
||||
'sale_report_view.xml',
|
||||
'product_view.xml',
|
||||
'security/ir.model.access.csv',
|
||||
],
|
||||
'installable': True,
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||
# Copyright 2017-2019 Akretion France (https://akretion.com/)
|
||||
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import models, fields
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||
# Copyright 2017-2019 Akretion France
|
||||
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import models, fields
|
||||
@@ -8,7 +8,7 @@ from odoo import models, fields
|
||||
class ProductTemplate(models.Model):
|
||||
_inherit = 'product.template'
|
||||
|
||||
track_service = fields.Selection(track_visibility='onchange')
|
||||
service_type = fields.Selection(track_visibility='onchange')
|
||||
expense_policy = fields.Selection(track_visibility='onchange')
|
||||
invoice_policy = fields.Selection(track_visibility='onchange')
|
||||
sale_line_warn = fields.Selection(track_visibility='onchange')
|
||||
|
||||
@@ -18,8 +18,9 @@ because the parent menu entry is in the sale module -->
|
||||
|
||||
<!-- This menu entry is very useful for mass export/import of prices -->
|
||||
<menuitem id="product_pricelist_item_menu"
|
||||
parent="sale.menu_product_pricelist_main"
|
||||
parent="sale.product_menu_catalog"
|
||||
action="product_pricelist_item_action"
|
||||
groups="product.group_pricelist_item"
|
||||
sequence="50"/>
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2015 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# Copyright (C) 2015-2019 Akretion France (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 odoo import models, fields, api
|
||||
from odoo.tools import float_is_zero
|
||||
@@ -11,11 +11,10 @@ class SaleOrder(models.Model):
|
||||
_inherit = 'sale.order'
|
||||
|
||||
date_order = fields.Datetime(track_visibility='onchange')
|
||||
date_confirm = fields.Date(track_visibility='onchange')
|
||||
confirmation_date = fields.Datetime(track_visibility='onchange')
|
||||
client_order_ref = fields.Char(track_visibility='onchange')
|
||||
# for partner_id, the 'sale' module sets track_visibility='always'
|
||||
partner_id = fields.Many2one(track_visibility='onchange')
|
||||
# for amount_tax, the 'sale' module sets track_visibility='always'
|
||||
amount_tax = fields.Monetary(track_visibility='onchange')
|
||||
partner_shipping_id = fields.Many2one(track_visibility='onchange')
|
||||
partner_invoice_id = fields.Many2one(track_visibility='onchange')
|
||||
@@ -37,21 +36,6 @@ class SaleOrder(models.Model):
|
||||
break
|
||||
order.has_discount = has_discount
|
||||
|
||||
@api.multi
|
||||
def action_confirm(self):
|
||||
'''Reload view upon order confirmation to display the 3 qty cols'''
|
||||
res = super(SaleOrder, self).action_confirm()
|
||||
if len(self) == 1:
|
||||
res = self.env['ir.actions.act_window'].for_xml_id(
|
||||
'sale', 'action_orders')
|
||||
res.update({
|
||||
'view_mode': 'form,tree,kanban,calendar,pivot,graph',
|
||||
'res_id': self.id,
|
||||
'views': False,
|
||||
'context': {'hide_sale': False},
|
||||
})
|
||||
return res
|
||||
|
||||
# for report
|
||||
@api.multi
|
||||
def py3o_lines_layout(self):
|
||||
@@ -88,11 +72,3 @@ class SaleOrder(models.Model):
|
||||
# {'subtotal': 8932.23},
|
||||
# ]
|
||||
return res2
|
||||
|
||||
|
||||
class ProcurementGroup(models.Model):
|
||||
_inherit = 'procurement.group'
|
||||
|
||||
sale_ids = fields.One2many(
|
||||
'sale.order', 'procurement_group_id', string='Sale Orders',
|
||||
readonly=True)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2018 Akretion (http://www.akretion.com/)
|
||||
Copyright 2018-2019 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).
|
||||
-->
|
||||
@@ -21,7 +21,7 @@
|
||||
<field name="product_uom_qty" sum="1"/>
|
||||
<field name="qty_delivered" sum="1"/>
|
||||
<field name="qty_to_invoice" sum="1"/>
|
||||
<field name="product_uom" groups="product.group_uom"/>
|
||||
<field name="product_uom" groups="uom.group_uom"/>
|
||||
<field name="price_subtotal" sum="1"/>
|
||||
<field name="state"/>
|
||||
</tree>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
© 2015-2016 Akretion (http://www.akretion.com/)
|
||||
Copyright 2015-2019 Akretion France (http://www.akretion.com/)
|
||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
@@ -12,17 +12,11 @@
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<notebook position="inside">
|
||||
<page string="Invoices" states="progress,waiting_date,manual,invoice_except,shipping_except,done">
|
||||
<field name="invoice_ids" nolabel="1" context="{'form_view_ref': 'account.invoice_form'}"/>
|
||||
</page>
|
||||
</notebook>
|
||||
<field name="fiscal_position_id" position="attributes">
|
||||
<attribute name="widget">selection</attribute>
|
||||
</field>
|
||||
<field name="partner_shipping_id" position="attributes">
|
||||
<attribute name="context">{'show_address': 1, 'default_type': 'delivery'}</attribute>
|
||||
<attribute name="options">{'always_reload': True}</attribute>
|
||||
<attribute name="context" operation="python_dict" key="show_address">1</attribute>
|
||||
</field>
|
||||
<button name="action_cancel" type="object" position="attributes">
|
||||
<attribute name="confirm">Are you sure you want to cancel this sale order?</attribute>
|
||||
@@ -41,7 +35,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" widget="monetary"/>
|
||||
<field name="amount_untaxed" sum="Total Untaxed"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
@@ -52,13 +46,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" widget="monetary"/>
|
||||
</field>
|
||||
<field name="date_order" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</field>
|
||||
<field name="date_order" position="after">
|
||||
<field name="confirmation_date"/>
|
||||
<field name="amount_untaxed" sum="Total Untaxed"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
@@ -68,7 +56,7 @@
|
||||
<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 name="order_month" position="after">
|
||||
<filter string="Order Confirmation Month" name="confirmation_date_groupby" context="{'group_by': 'confirmation_date'}"/>
|
||||
<filter string="State" name="state_groupby" context="{'group_by': 'state'}"/>
|
||||
</filter>
|
||||
@@ -81,6 +69,10 @@ https://github.com/odoo/odoo/commit/c1e5ab9b1331c3cb7dc2232bf78952bdb40ad939 -->
|
||||
<field name="domain">[('state', 'in', ('draft', 'sent', 'cancel'))]</field>
|
||||
</record>
|
||||
|
||||
<record id="sale.action_quotations_with_onboarding" model="ir.actions.act_window">
|
||||
<field name="domain">[('state', 'in', ('draft', 'sent', 'cancel'))]</field>
|
||||
</record>
|
||||
|
||||
<record id="sale.action_quotations_salesteams" model="ir.actions.act_window">
|
||||
<field name="domain">[('state', 'in', ('draft', 'sent', 'cancel'))]</field>
|
||||
</record>
|
||||
@@ -90,9 +82,9 @@ https://github.com/odoo/odoo/commit/c1e5ab9b1331c3cb7dc2232bf78952bdb40ad939 -->
|
||||
<field name="model">sale.order.line</field>
|
||||
<field name="inherit_id" ref="sale.view_sales_order_line_filter"/>
|
||||
<field name="arch" type="xml">
|
||||
<group expand="0" position="inside">
|
||||
<filter string="Customer" context="{'group_by': 'order_partner_id'}"/>
|
||||
</group>
|
||||
<filter name="product" position="before">
|
||||
<filter string="Customer" name="partner_groupby" context="{'group_by': 'order_partner_id'}"/>
|
||||
</filter>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -117,29 +109,4 @@ https://github.com/odoo/odoo/commit/c1e5ab9b1331c3cb7dc2232bf78952bdb40ad939 -->
|
||||
</record>
|
||||
|
||||
|
||||
<record id="procurement_form_view" model="ir.ui.view">
|
||||
<field name="name">procurement_usability.procurement.order.form</field>
|
||||
<field name="model">procurement.order</field>
|
||||
<field name="inherit_id" ref="procurement.procurement_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="origin" position="after">
|
||||
<field name="sale_line_id" readonly="True"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<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>
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
sale.access_product_uom_categ_sale_manager,product.uom.categ for settings grp,product.model_product_uom_categ,base.group_system,1,1,1,1
|
||||
sale.access_product_uom_sale_manager,product.uom for settings grp,product.model_product_uom,base.group_system,1,1,1,1
|
||||
|
Reference in New Issue
Block a user