Merge branch '8.0' of github.com:akretion/odoo-usability into 8.0
This commit is contained in:
@@ -225,6 +225,7 @@ module -->
|
||||
<field name="name">account_usability.account_move_line_tree</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field name="inherit_id" ref="account.view_move_line_tree"/>
|
||||
<field name="priority">1</field> <!-- to be compatible with account_analytic_plans which removes the field analytic_account_id and has a priority of 2 -->
|
||||
<field name="arch" type="xml">
|
||||
<field name="analytic_account_id" position="attributes">
|
||||
<attribute name="invisible"></attribute>
|
||||
|
||||
3
product_unit_manager_group/__init__.py
Normal file
3
product_unit_manager_group/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2017 Chafique DELLI @ Akretion
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
23
product_unit_manager_group/__openerp__.py
Normal file
23
product_unit_manager_group/__openerp__.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2017 Chafique DELLI @ Akretion
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
{
|
||||
'name': 'Product Unit Manager Group',
|
||||
'summary': 'Add a group Product Unit of Measure Manager',
|
||||
'version': '8.0.1.0.0',
|
||||
'category': 'Product',
|
||||
'website': 'http://akretion.com',
|
||||
'author': 'Akretion',
|
||||
'license': 'AGPL-3',
|
||||
'installable': True,
|
||||
'depends': [
|
||||
'sale',
|
||||
'purchase',
|
||||
'mrp',
|
||||
],
|
||||
'data': [
|
||||
'security/product_security.xml',
|
||||
'security/ir.model.access.csv',
|
||||
'views/product_view.xml',
|
||||
],
|
||||
}
|
||||
29
product_unit_manager_group/i18n/fr.po
Normal file
29
product_unit_manager_group/i18n/fr.po
Normal file
@@ -0,0 +1,29 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * product_unit_manager_group
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 8.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-03-13 15:35+0000\n"
|
||||
"PO-Revision-Date: 2017-03-13 15:35+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: product_unit_manager_group
|
||||
#: model:res.groups,comment:product_unit_manager_group.group_uom_manager
|
||||
#: model:res.groups,name:product_unit_manager_group.group_uom_manager
|
||||
msgid "Manage Multiple Units of Measure"
|
||||
msgstr "Gérer plusieurs unités de mesure"
|
||||
|
||||
#. module: product_unit_manager_group
|
||||
#: model:res.groups,comment:product.group_uom
|
||||
#: model:res.groups,name:product.group_uom
|
||||
msgid "Use Multiple Units of Measure"
|
||||
msgstr "Utiliser plusieurs unités de mesure"
|
||||
|
||||
13
product_unit_manager_group/security/ir.model.access.csv
Normal file
13
product_unit_manager_group/security/ir.model.access.csv
Normal file
@@ -0,0 +1,13 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_product_uom_manager,product.uom.manager,product.model_product_uom,group_uom_manager,1,1,1,1
|
||||
access_product_uom_categ_manager,product.uom.categ.manager,product.model_product_uom_categ,group_uom_manager,1,1,1,1
|
||||
access_product_uom_user,product.uom.user,product.model_product_uom,product.group_uom,1,0,0,0
|
||||
access_product_uom_categ_user,product.uom.categ.user,product.model_product_uom_categ,product.group_uom,1,0,0,0
|
||||
sale.access_product_uom_sale_manager,product.uom salemanager,product.model_product_uom,base.group_sale_manager,1,0,0,0
|
||||
sale.access_product_uom_categ_sale_manager,product.uom.categ salemanager,product.model_product_uom_categ,base.group_sale_manager,1,0,0,0
|
||||
purchase.access_product_uom_purchase_manager,product.uom purchase_manager,product.model_product_uom,purchase.group_purchase_manager,1,0,0,0
|
||||
purchase.access_product_uom_categ_purchase_manager,product.uom.categ purchase_manager,product.model_product_uom_categ,purchase.group_purchase_manager,1,0,0,0
|
||||
mrp.access_product_uom_mrp_manager,product.uom mrp_manager,product.model_product_uom,mrp.group_mrp_manager,1,0,0,0
|
||||
mrp.access_product_uom_categ_mrp_manager,product.uom.categ mrp_manager,product.model_product_uom_categ,mrp.group_mrp_manager,1,0,0,0
|
||||
stock.access_product_uom_stock_manager,product.uom stock_manager,product.model_product_uom,stock.group_stock_manager,1,0,0,0
|
||||
stock.access_product_uom_categ_stock_manager,product.uom.categ stock_manager,product.model_product_uom_categ,stock.group_stock_manager,1,0,0,0
|
||||
|
19
product_unit_manager_group/security/product_security.xml
Normal file
19
product_unit_manager_group/security/product_security.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="0">
|
||||
|
||||
<record id="product.group_uom" model="res.groups">
|
||||
<field name="name">Use Multiple Units of Measure</field>
|
||||
<field name="comment">Use multiple units of measure</field>
|
||||
</record>
|
||||
|
||||
<record id="group_uom_manager" model="res.groups">
|
||||
<field name="name">Manage Multiple Units of Measure</field>
|
||||
<field name="comment">Manage Multiple Units of Measure</field>
|
||||
<field name="category_id" ref="base.module_category_hidden"/>
|
||||
<field name="users" eval="[(4, ref('base.user_root'))]"/>
|
||||
<field name="implied_ids" eval="[(6, 0, [ref('product.group_uom')])]"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
43
product_unit_manager_group/views/product_view.xml
Normal file
43
product_unit_manager_group/views/product_view.xml
Normal file
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="product.next_id_16" model="ir.ui.menu">
|
||||
<field name="groups_id" eval="[(6, 0, [ref('product_unit_manager_group.group_uom_manager')])]"/>
|
||||
</record>
|
||||
|
||||
<record id="product.menu_product_uom_form_action" model="ir.ui.menu">
|
||||
<field name="groups_id" eval="[(6, 0, [ref('product_unit_manager_group.group_uom_manager')])]"/>
|
||||
</record>
|
||||
|
||||
<record id="product.menu_product_uom_categ_form_action" model="ir.ui.menu">
|
||||
<field name="groups_id" eval="[(6, 0, [ref('product_unit_manager_group.group_uom_manager')])]"/>
|
||||
</record>
|
||||
|
||||
<record id="stock.menu_stock_unit_measure_stock" model="ir.ui.menu">
|
||||
<field name="groups_id" eval="[(6, 0, [ref('product_unit_manager_group.group_uom_manager')])]"/>
|
||||
</record>
|
||||
|
||||
<record id="stock.menu_stock_uom_categ_form_action" model="ir.ui.menu">
|
||||
<field name="groups_id" eval="[(6, 0, [ref('product_unit_manager_group.group_uom_manager')])]"/>
|
||||
</record>
|
||||
|
||||
<record id="stock.menu_stock_uom_form_action" model="ir.ui.menu">
|
||||
<field name="groups_id" eval="[(6, 0, [ref('product_unit_manager_group.group_uom_manager')])]"/>
|
||||
</record>
|
||||
|
||||
<record id="purchase.menu_purchase_unit_measure_purchase" model="ir.ui.menu">
|
||||
<field name="groups_id" eval="[(6, 0, [ref('product_unit_manager_group.group_uom_manager')])]"/>
|
||||
</record>
|
||||
|
||||
<record id="purchase.menu_purchase_uom_categ_form_action" model="ir.ui.menu">
|
||||
<field name="groups_id" eval="[(6, 0, [ref('product_unit_manager_group.group_uom_manager')])]"/>
|
||||
</record>
|
||||
|
||||
<record id="purchase.menu_purchase_uom_form_action" model="ir.ui.menu">
|
||||
<field name="groups_id" eval="[(6, 0, [ref('product_unit_manager_group.group_uom_manager')])]"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -125,6 +125,78 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_ul_form_view" model="ir.ui.view">
|
||||
<field name="name">usability.product.ul.form</field>
|
||||
<field name="model">product.ul</field>
|
||||
<field name="inherit_id" ref="product.product_ul_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<!-- Useusally, the size of packaging is written in cm,
|
||||
so I propose to use that UoM for size of packaging.
|
||||
Nothing is written in the native product module about this -->
|
||||
<field name="height" position="replace">
|
||||
<label for="height"/>
|
||||
<div name="height">
|
||||
<field name="height" class="oe_inline"/>
|
||||
<label string=" cm" class="oe_inline"/>
|
||||
</div>
|
||||
</field>
|
||||
<field name="width" position="replace">
|
||||
<label for="width"/>
|
||||
<div name="width">
|
||||
<field name="width" class="oe_inline"/>
|
||||
<label string=" cm" class="oe_inline"/>
|
||||
</div>
|
||||
</field>
|
||||
<field name="length" position="replace">
|
||||
<label for="length"/>
|
||||
<div name="length">
|
||||
<field name="length" class="oe_inline"/>
|
||||
<label string=" cm" class="oe_inline"/>
|
||||
</div>
|
||||
</field>
|
||||
<field name="weight" position="replace">
|
||||
<label for="weight"/>
|
||||
<div name="weight">
|
||||
<field name="weight" class="oe_inline"/>
|
||||
<label string=" kg" class="oe_inline"/>
|
||||
</div>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_ul_tree" model="ir.ui.view">
|
||||
<field name="name">usability.product.ul.tree</field>
|
||||
<field name="model">product.ul</field>
|
||||
<field name="inherit_id" ref="product.product_ul_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="type" position="after">
|
||||
<!-- not so important, but we have room in the tree view, so let's use it -->
|
||||
<field name="height"/>
|
||||
<field name="width"/>
|
||||
<field name="length"/>
|
||||
<field name="weight"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Add missing search view on product.ul -->
|
||||
<!-- It doesn't work: when you activate the group by type, it gives a JS error
|
||||
TypeError: key.indexOf is not a function
|
||||
-->
|
||||
<!--
|
||||
<record id="product_ul_search" model="ir.ui.view">
|
||||
<field name="name">usability.product.ul.search</field>
|
||||
<field name="model">product.ul</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Logistic Units">
|
||||
<field name="name"/>
|
||||
<group string="Group By" name="groupby">
|
||||
<filter name="type_groupby" string="Type" context="{'group_by': 'type'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
-->
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
5
sale_partner_shipping_filter_with_customer/__init__.py
Normal file
5
sale_partner_shipping_filter_with_customer/__init__.py
Normal file
@@ -0,0 +1,5 @@
|
||||
# coding: utf-8
|
||||
# © 2017 Chafique DELLI @ Akretion
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from . import models
|
||||
21
sale_partner_shipping_filter_with_customer/__openerp__.py
Normal file
21
sale_partner_shipping_filter_with_customer/__openerp__.py
Normal file
@@ -0,0 +1,21 @@
|
||||
# coding: utf-8
|
||||
# © 2017 Chafique DELLI @ Akretion
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
{
|
||||
'name': 'Partner Shipping Filter with Customer',
|
||||
'summary': "Shows only delivery addresses that are linked "
|
||||
"with the customer",
|
||||
'version': '8.0.1.0.0',
|
||||
'category': 'Sale Management',
|
||||
'website': 'http://akretion.com',
|
||||
'author': 'Akretion, Odoo Community Association (OCA)',
|
||||
'license': 'AGPL-3',
|
||||
'installable': True,
|
||||
'depends': [
|
||||
'sale',
|
||||
],
|
||||
'data': [
|
||||
'views/sale_view.xml',
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
# coding: utf-8
|
||||
# © 2017 Chafique DELLI @ Akretion
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from . import sale
|
||||
12
sale_partner_shipping_filter_with_customer/models/sale.py
Normal file
12
sale_partner_shipping_filter_with_customer/models/sale.py
Normal file
@@ -0,0 +1,12 @@
|
||||
# coding: utf-8
|
||||
# © 2017 Chafique DELLI @ Akretion
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from openerp import models, fields
|
||||
|
||||
|
||||
class SaleOrder(models.Model):
|
||||
_inherit = 'sale.order'
|
||||
|
||||
commercial_partner_id = fields.Many2one(
|
||||
related='partner_id.commercial_partner_id', readonly=True)
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_order_form" model="ir.ui.view">
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='partner_id']" position="after">
|
||||
<field name="commercial_partner_id" invisible="1"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='partner_shipping_id']" position="attributes">
|
||||
<attribute name="domain">['|',
|
||||
('id', '=', partner_id), '&',
|
||||
('type','=', 'delivery'), '&',
|
||||
('id', 'child_of', commercial_partner_id), ('parent_id', '!=', False)]</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -38,6 +38,8 @@ class StockPicking(models.Model):
|
||||
# In the stock module: _order = "priority desc, date asc, id desc"
|
||||
# The problem is date asc
|
||||
|
||||
partner_id = fields.Many2one(track_visibility='onchange')
|
||||
|
||||
|
||||
class StockLocation(models.Model):
|
||||
_inherit = 'stock.location'
|
||||
|
||||
@@ -256,6 +256,16 @@ in the quantities for his reception -->
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_quant_package_tree" model="ir.ui.view">
|
||||
<field name="name">stock.usability.quant.package.tree</field>
|
||||
<field name="model">stock.quant.package</field>
|
||||
<field name="inherit_id" ref="stock.view_quant_package_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="company_id" position="attributes">
|
||||
<attribute name="groups">base.group_multi_company</attribute>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_move_tree_receipt_picking" model="ir.ui.view">
|
||||
<field name="name">stock.usability.stock.move.tree2</field>
|
||||
|
||||
Reference in New Issue
Block a user