Compare commits

..

1 Commits

Author SHA1 Message Date
clementmbr
16424a6897 [12.0][MIG] product_unit_manager_group + rename
Basic module migration and :

- rename module's name product_unit_manager_group into uom_manager_group
in order to follow the new separation between product and uom modules
in Odoo 12.0
- light refactor adding a group category "Units of Measure" with two
levels :
    - nothing : neither UoM fields nor menus are displayed
    - User : UoM fields are displayed but not Uom menus (Users are not
    allowed to create or modify UoM)
    - Manager : display both fields and UoM menus

The rest of the module philosophy is maintained. All the Sales
Manager, Stock Manager, MRP Manager have no more rights to create or
modify UoMs. Only "UoM Managers" can.
2020-05-13 18:02:04 -03:00
87 changed files with 285 additions and 2349 deletions

View File

@@ -83,7 +83,7 @@ class AccountInvoice(models.Model):
# top of the screen
# That's why we have to cut the name_get() when it's too long
def name_get(self):
old_res = super().name_get()
old_res = super(AccountInvoice, self).name_get()
res = []
for old_re in old_res:
name = old_re[1]
@@ -103,8 +103,9 @@ class AccountInvoice(models.Model):
# 2) the 'name' field of the account.move.line is used in the overdue
# letter, and '/' is not meaningful for our customer !
# TODO mig to v12
# @api.multi
# def action_move_create(self):
# res = super().action_move_create()
# res = super(AccountInvoice, self).action_move_create()
# for inv in self:
# self._cr.execute(
# "UPDATE account_move_line SET name= "
@@ -215,15 +216,7 @@ class AccountInvoiceLine(models.Model):
class AccountJournal(models.Model):
_inherit = 'account.journal'
hide_bank_statement_balance = fields.Boolean(
string='Hide Bank Statement Balance',
help="You may want to enable this option when your bank "
"journal is generated from a bank statement file that "
"doesn't handle start/end balance (QIF for instance) and "
"you don't want to enter the start/end balance manually: it "
"will prevent the display of wrong information in the accounting "
"dashboard and on bank statements.")
@api.multi
@api.depends(
'name', 'currency_id', 'company_id', 'company_id.currency_id', 'code')
def name_get(self):
@@ -269,6 +262,7 @@ class AccountJournal(models.Model):
class AccountAccount(models.Model):
_inherit = 'account.account'
@api.multi
@api.depends('name', 'code')
def name_get(self):
if self._context.get('account_account_show_code_only'):
@@ -277,7 +271,7 @@ class AccountAccount(models.Model):
res.append((record.id, record.code))
return res
else:
return super().name_get()
return super(AccountAccount, self).name_get()
# https://github.com/odoo/odoo/issues/23040
# TODO mig to v12
@@ -360,6 +354,7 @@ class AccountAccount(models.Model):
class AccountAnalyticAccount(models.Model):
_inherit = 'account.analytic.account'
@api.multi
def name_get(self):
if self._context.get('analytic_account_show_code_only'):
res = []
@@ -367,7 +362,7 @@ class AccountAnalyticAccount(models.Model):
res.append((record.id, record.code or record.name))
return res
else:
return super().name_get()
return super(AccountAnalyticAccount, self).name_get()
_sql_constraints = [(
'code_company_unique',
@@ -514,9 +509,8 @@ class AccountBankStatement(models.Model):
end_date = fields.Date(
compute='_compute_dates', string='End Date', readonly=True,
store=True)
hide_bank_statement_balance = fields.Boolean(
related='journal_id.hide_bank_statement_balance', readonly=True)
@api.multi
@api.depends('line_ids.date')
def _compute_dates(self):
for st in self:
@@ -524,14 +518,7 @@ class AccountBankStatement(models.Model):
st.start_date = dates and min(dates) or False
st.end_date = dates and max(dates) or False
def _balance_check(self):
for stmt in self:
if stmt.hide_bank_statement_balance:
continue
else:
super(AccountBankStatement, stmt)._balance_check()
return True
@api.multi
@api.depends('name', 'start_date', 'end_date')
def name_get(self):
res = []
@@ -569,14 +556,15 @@ class AccountBankStatementLine(models.Model):
# search_reconciliation_proposition=False, context=None):
# # Make variable name shorted for PEP8 !
# search_rec_prop = search_reconciliation_proposition
# return super().\
# return super(AccountBankStatementLine, self).\
# get_data_for_reconciliations(
# cr, uid, ids, excluded_ids=excluded_ids,
# search_reconciliation_proposition=search_rec_prop,
# context=context)
def _prepare_reconciliation_move(self, move_ref):
vals = super()._prepare_reconciliation_move(move_ref)
vals = super(AccountBankStatementLine, self).\
_prepare_reconciliation_move(move_ref)
# By default, ref contains the name of the statement + name of the
# statement line. It causes 2 problems:
# 1) The 'ref' field is too big
@@ -681,7 +669,8 @@ class AccountReconciliation(models.AbstractModel):
# bank statement
@api.model
def _domain_move_lines(self, search_str):
str_domain = super()._domain_move_lines(search_str)
str_domain = super(AccountReconciliation, self)._domain_move_lines(
search_str)
account_code_domain = [('account_id.code', '=ilike', search_str + '%')]
str_domain = expression.OR([str_domain, account_code_domain])
return str_domain

View File

@@ -409,31 +409,6 @@ module -->
</field>
</record>
<record id="view_account_journal_form" model="ir.ui.view">
<field name="name">usability.account.journal.form</field>
<field name="model">account.journal</field>
<field name="inherit_id" ref="account.view_account_journal_form"/>
<field name="arch" type="xml">
<field name="bank_statements_source" position="after">
<field name="hide_bank_statement_balance" groups="account.group_account_user"/>
</field>
</field>
</record>
<record id="account_journal_dashboard_kanban_view" model="ir.ui.view">
<field name="name">usability.account.journal.dashboard</field>
<field name="model">account.journal</field>
<field name="inherit_id" ref="account.account_journal_dashboard_kanban_view"/>
<field name="arch" type="xml">
<field name="kanban_dashboard" position="after">
<field name="hide_bank_statement_balance"/>
</field>
<xpath expr="//div[@name='latest_statement']/.." position="attributes">
<attribute name="t-if">dashboard.last_balance != dashboard.account_balance &amp;&amp; !record.hide_bank_statement_balance.raw_value</attribute>
</xpath>
</field>
</record>
<record id="view_account_journal_tree" model="ir.ui.view">
<field name="name">usability.account.journal.tree</field>
<field name="model">account.journal</field>
@@ -472,26 +447,10 @@ module -->
<field name="date" position="after">
<field name="start_date"/>
<field name="end_date"/>
<field name="hide_bank_statement_balance" invisible="1"/>
</field>
<field name="date" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<label for="balance_start" position="attributes">
<attribute name="attrs">{'invisible': [('hide_bank_statement_balance', '=', True)]}</attribute>
</label>
<label for="balance_end_real" position="attributes">
<attribute name="attrs">{'invisible': [('hide_bank_statement_balance', '=', True)]}</attribute>
</label>
<xpath expr="//field[@name='balance_start']/.." position="attributes">
<attribute name="attrs">{'invisible': [('hide_bank_statement_balance', '=', True)]}</attribute>
</xpath>
<xpath expr="//field[@name='balance_end_real']/.." position="attributes">
<attribute name="attrs">{'invisible': [('hide_bank_statement_balance', '=', True)]}</attribute>
</xpath>
<group name="sale_total" position="attributes">
<attribute name="attrs">{'invisible': [('hide_bank_statement_balance', '=', True)]}</attribute>
</group>
</field>
</record>

View File

@@ -12,6 +12,10 @@
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<!-- Wider 'name' field -->
<xpath expr="//sheet/div[hasclass('oe_title')]" position="attributes">
<attribute name="style">width: 650px;</attribute>
</xpath>
<xpath expr="//field[@name='child_ids']/form//field[@name='email']" position="attributes">
<attribute name="widget">email</attribute>
</xpath>

View File

@@ -37,7 +37,7 @@
</group>
</page>
</notebook>
<xpath expr="//field[@name='bom_line_ids']/tree/field[@name='operation_id']" position="after">
<xpath expr="//field[@name='bom_line_ids']/tree/field[@name='product_uom_id']" position="after">
<field name="standard_price"/>
</xpath>
</field>

View File

@@ -17,7 +17,7 @@ MRP Usability
:target: https://github.com/akretion/odoo-usability/tree/12.0/mrp_usability
:alt: akretion/odoo-usability
|badge1| |badge2| |badge3|
|badge1| |badge2| |badge3|
Small usability improvements on MRP:
@@ -31,8 +31,6 @@ Small usability improvements on MRP:
* complete Manufacturing Order report with unvailable products
* improve smart button from products to BoMs (display BoM form if only one instead of displaying a list of one)
**Table of contents**
.. contents::

View File

@@ -1 +1 @@
from . import models
from . import mrp

View File

@@ -13,8 +13,7 @@
'website': 'http://www.akretion.com',
'depends': ['mrp'],
'data': [
'views/mrp_views.xml',
'views/product_views.xml',
'mrp_view.xml',
'report/mrp_report.xml'
],
'installable': True,

View File

@@ -1,2 +0,0 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import mrp, product

View File

@@ -1,44 +0,0 @@
# Copyright (C) 2020 - Akretion
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from odoo import models
class ProductTemplate(models.Model):
_inherit = "product.template"
def action_view_bom(self):
"""Replace native action `template_open_bom` to distinguish if we will display
only one BoM form or a list of BoMs."""
self.ensure_one()
act_window_xml_id = "mrp.mrp_bom_form_action"
act_window = self.env.ref(act_window_xml_id).read()[0]
if self.bom_count > 1:
act_window["context"] = {
"default_product_tmpl_id": self.id,
"search_default_product_tmpl_id": self.id,
}
else:
act_window["context"] = {"default_product_tmpl_id": self.id}
act_window["views"] = [(self.env.ref("mrp.mrp_bom_form_view").id, "form")]
act_window["res_id"] = (
self.env["mrp.bom"].search([("product_tmpl_id", "=", self.id)]).id
)
return act_window
class ProductProduct(models.Model):
_inherit = "product.product"
def action_view_bom(self):
res = super().action_view_bom()
bom_target_ids = self.env["mrp.bom"].search(res["domain"])
if len(bom_target_ids) == 1:
res["views"] = [(self.env.ref("mrp.mrp_bom_form_view").id, "form")]
res["res_id"] = bom_target_ids[0].id
return res

View File

@@ -9,5 +9,3 @@ Small usability improvements on MRP:
* show bom type in tree view + add group by
* complete Manufacturing Order report with unvailable products
* improve smart button from products to BoMs (display BoM form if only one instead of displaying a list of one)

View File

@@ -1,25 +0,0 @@
<?xml version="1.0"?>
<odoo>
<record id="product_template_form_view_bom_button" model="ir.ui.view">
<field name="name">product.template.procurement</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="mrp.product_template_form_view_bom_button" />
<field name="arch" type="xml">
<xpath expr="//field[@name='bom_count']/.." position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='bom_count']/.." position="after">
<button class="oe_stat_button" name="action_view_bom" type="object"
attrs="{'invisible':[('type', 'not in', ['product', 'consu'])]}"
icon="fa-flask">
<field string="Bill of Materials" name="bom_count"
widget="statinfo" />
</button>
</xpath>
</field>
</record>
</odoo>

View File

@@ -1 +0,0 @@
from . import wizard

View File

@@ -1,18 +0,0 @@
# Copyright 2020 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).
{
'name': 'Service Line Qty Update Base',
'version': '12.0.1.0.0',
'category': 'Tools',
'license': 'AGPL-3',
'summary': 'Update delivery qty on service lines - Base module',
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': ['product'],
'data': [
'wizard/service_qty_update_view.xml',
],
'installable': True,
}

View File

@@ -1 +0,0 @@
from . import service_qty_update

View File

@@ -1,70 +0,0 @@
# Copyright 2020 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 _, api, fields, models
from odoo.tools import float_compare, float_is_zero
import odoo.addons.decimal_precision as dp
from odoo.exceptions import UserError
class ServiceQtyUpdate(models.TransientModel):
_name = 'service.qty.update'
_description = 'Wizard to update delivery qty on service lines'
line_ids = fields.One2many('service.qty.update.line', 'parent_id', string="Lines")
def run(self):
self.ensure_one()
prec = self.env['decimal.precision'].precision_get('Product Unit of Measure')
for line in self.line_ids:
if float_compare(line.post_delivered_qty, line.order_qty, precision_digits=prec) > 0:
raise UserError(_(
"On line '%s', the total delivered qty (%s) is superior to the ordered qty (%s).") % (line.name, line.post_delivered_qty, line.order_qty))
fc_added = float_compare(line.added_delivered_qty, 0, precision_digits=prec)
if fc_added < 0:
raise UserError(_(
"On line '%s', the added quantity is negative.") % line.name)
if fc_added > 0:
line.process_line()
return True
class ServiceQtyUpdateLine(models.TransientModel):
_name = 'service.qty.update.line'
_description = 'Lines of the wizard that updates delivery qty on service lines'
parent_id = fields.Many2one(
'service.qty.update', string='Wizard', ondelete='cascade')
product_id = fields.Many2one('product.product', string='Product', readonly=True)
name = fields.Char()
name_readonly = fields.Char(related='name', string='Description')
order_qty = fields.Float(
string='Order Qty',
digits=dp.get_precision('Product Unit of Measure'))
order_qty_readonly = fields.Float(related='order_qty', string='Product Unit of Measure')
pre_delivered_qty = fields.Float(
digits=dp.get_precision('Product Unit of Measure'))
pre_delivered_qty_readonly = fields.Float(related='pre_delivered_qty', string='Current Delivered Qty')
added_delivered_qty = fields.Float(
string='Added Delivered Qty',
digits=dp.get_precision('Product Unit of Measure'))
post_delivered_qty = fields.Float(
compute='_compute_post_delivered_qty',
string='Total Delivered Qty',
digits=dp.get_precision('Product Unit of Measure'))
uom_id = fields.Many2one('uom.uom', string='UoM', readonly=True)
comment = fields.Char(string='Comment')
@api.depends('pre_delivered_qty', 'added_delivered_qty')
def _compute_post_delivered_qty(self):
for line in self:
line.post_delivered_qty = line.pre_delivered_qty + line.added_delivered_qty
def process_line(self):
# Write and message_post
return
# sale : qty_delivered
# purchase : qty_received

View File

@@ -1,48 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2020 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).
-->
<odoo>
<record id="service_qty_update_form" model="ir.ui.view">
<field name="model">service.qty.update</field>
<field name="arch" type="xml">
<form>
<group name="main">
<field name="line_ids" nolabel="1">
<tree editable="bottom">
<field name="product_id"/>
<field name="name" invisible="0"/>
<field name="name_readonly"/>
<field name="order_qty" invisible="1"/>
<field name="order_qty_readonly"/>
<field name="pre_delivered_qty" invisible="1"/>
<field name="pre_delivered_qty_readonly"/>
<field name="added_delivered_qty"/>
<field name="post_delivered_qty"/>
<field name="uom_id" groups="uom.group_uom"/>
<field name="comment"/>
</tree>
</field>
</group>
<footer>
<button name="run" type="object" string="Validate" class="btn-primary"/>
<button special="cancel" string="Cancel" class="btn-default"/>
</footer>
</form>
</field>
</record>
<record id="service_qty_update_action" model="ir.actions.act_window">
<field name="name">Service Order Lines - Update Delivered Qty</field>
<field name="res_model">service.qty.update</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
</odoo>

View File

@@ -1,2 +0,0 @@
from . import models
from . import wizard

View File

@@ -1,22 +0,0 @@
# Copyright 2020 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).
{
'name': 'Service Line Qty Update Purchase',
'version': '12.0.1.0.0',
'category': 'Tools',
'license': 'AGPL-3',
'summary': 'Update delivery qty on service lines - Purchase module',
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': [
'purchase',
'service_line_qty_update_base',
'purchase_reception_status',
],
'data': [
'views/purchase_order.xml',
],
'installable': True,
}

View File

@@ -1 +0,0 @@
from . import purchase_order

View File

@@ -1,21 +0,0 @@
# Copyright 2020 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 api, fields, models
class PurchaseOrder(models.Model):
_inherit = 'purchase.order'
has_service = fields.Boolean(compute='_compute_has_service')
@api.depends('order_line.product_id.type')
def _compute_has_service(self):
for order in self:
has_service = False
for l in order.order_line:
if l.product_id.type == 'service':
has_service = True
break
order.has_service = has_service

View File

@@ -1,27 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2020 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).
-->
<odoo>
<record id="purchase_order_form" model="ir.ui.view">
<field name="name">purchase.order.form</field>
<field name="model">purchase.order</field>
<field name="inherit_id" ref="purchase.purchase_order_form"/>
<field name="arch" type="xml">
<button name="action_view_invoice" position="after">
<button name="%(service_line_qty_update_base.service_qty_update_action)d" type="action" string="Update Service Qty" attrs="{'invisible': ['|', '|', ('state', 'not in', ('purchase', 'done')), ('has_service', '=', False), ('reception_status', '=', 'received')]}" groups="purchase.group_purchase_user"/>
<field name="has_service" invisible="1"/>
</button>
<xpath expr="//field[@name='order_line']/tree/field[@name='qty_received']" position="attributes">
<attribute name="readonly">1</attribute>
</xpath>
</field>
</record>
</odoo>

View File

@@ -1 +0,0 @@
from . import service_qty_update

View File

@@ -1,62 +0,0 @@
# Copyright 2020 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 _, api, fields, models
from odoo.tools import float_compare
from odoo.exceptions import UserError
class ServiceQtyUpdate(models.TransientModel):
_inherit = 'service.qty.update'
@api.model
def default_get(self, fields_list):
res = super().default_get(fields_list)
prec = self.env['decimal.precision'].precision_get('Product Unit of Measure')
if self._context.get('active_model') == 'purchase.order' and self._context.get('active_id'):
lines = []
order = self.env['purchase.order'].browse(self._context['active_id'])
for l in order.order_line.filtered(lambda x: x.product_id.type == 'service'):
if float_compare(l.product_qty, l.qty_received, precision_digits=prec) > 0:
lines.append((0, 0, {
'purchase_line_id': l.id,
'product_id': l.product_id.id,
'name': l.name,
'name_readonly': l.name,
'order_qty': l.product_qty,
'order_qty_readonly': l.product_qty,
'pre_delivered_qty': l.qty_received,
'pre_delivered_qty_readonly': l.qty_received,
'uom_id': l.product_uom.id,
}))
if lines:
res['line_ids'] = lines
else:
raise UserError(_(
"All service lines are fully received."))
return res
class ServiceQtyUpdateLine(models.TransientModel):
_inherit = 'service.qty.update.line'
purchase_line_id = fields.Many2one('purchase.order.line', string='Purchase Line', readonly=True)
def process_line(self):
po_line = self.purchase_line_id
if po_line:
new_qty = po_line.qty_received + self.added_delivered_qty
po_line.write({'qty_received': new_qty})
body = """
<p>Received qty updated on service line <b>%s</b>:
<ul>
<li>Added received qty: <b>%s</b></li>
<li>Total received qty: %s</li>
</ul></p>
""" % (self.name, self.added_delivered_qty, new_qty)
if self.comment:
body += '<p>Comment: %s</p>' % self.comment
po_line.order_id.message_post(body=body)
return super().process_line()

View File

@@ -1,2 +0,0 @@
from . import models
from . import wizard

View File

@@ -1,22 +0,0 @@
# Copyright 2020 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).
{
'name': 'Service Line Qty Update Sale',
'version': '12.0.1.0.0',
'category': 'Tools',
'license': 'AGPL-3',
'summary': 'Update delivery qty on service lines - Sale module',
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': [
'sale',
'service_line_qty_update_base',
# 'purchase_reception_status',
],
'data': [
'views/sale_order.xml',
],
'installable': True,
}

View File

@@ -1 +0,0 @@
from . import sale_order

View File

@@ -1,21 +0,0 @@
# Copyright 2020 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 api, fields, models
class SaleOrder(models.Model):
_inherit = 'sale.order'
has_service = fields.Boolean(compute='_compute_has_service')
@api.depends('order_line.product_id.type')
def _compute_has_service(self):
for order in self:
has_service = False
for l in order.order_line:
if l.product_id.type == 'service':
has_service = True
break
order.has_service = has_service

View File

@@ -1,26 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2020 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).
-->
<odoo>
<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">
<button name="action_quotation_send" position="after">
<button name="%(service_line_qty_update_base.service_qty_update_action)d" type="action" string="Update Service Qty" attrs="{'invisible': ['|', ('state', 'not in', ('sale', 'done')), ('has_service', '=', False)]}" groups="sales_team.group_sale_salesman"/>
<field name="has_service" invisible="1"/>
</button>
<xpath expr="//field[@name='order_line']/tree/field[@name='qty_delivered']" position="attributes">
<attribute name="readonly">1</attribute>
</xpath>
</field>
</record>
</odoo>

View File

@@ -1 +0,0 @@
from . import service_qty_update

View File

@@ -1,62 +0,0 @@
# Copyright 2020 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 _, api, fields, models
from odoo.tools import float_compare
from odoo.exceptions import UserError
class ServiceQtyUpdate(models.TransientModel):
_inherit = 'service.qty.update'
@api.model
def default_get(self, fields_list):
res = super().default_get(fields_list)
prec = self.env['decimal.precision'].precision_get('Product Unit of Measure')
if self._context.get('active_model') == 'sale.order' and self._context.get('active_id'):
lines = []
order = self.env['sale.order'].browse(self._context['active_id'])
for l in order.order_line.filtered(lambda x: x.product_id.type == 'service'):
if float_compare(l.product_qty, l.qty_delivered, precision_digits=prec) > 0:
lines.append((0, 0, {
'sale_line_id': l.id,
'product_id': l.product_id.id,
'name': l.name,
'name_readonly': l.name,
'order_qty': l.product_uom_qty,
'order_qty_readonly': l.product_uom_qty,
'pre_delivered_qty': l.qty_delivered,
'pre_delivered_qty_readonly': l.qty_delivered,
'uom_id': l.product_uom.id,
}))
if lines:
res['line_ids'] = lines
else:
raise UserError(_(
"All service lines are fully delivered."))
return res
class ServiceQtyUpdateLine(models.TransientModel):
_inherit = 'service.qty.update.line'
sale_line_id = fields.Many2one('sale.order.line', string='Sale Line', readonly=True)
def process_line(self):
so_line = self.sale_line_id
if so_line:
new_qty = so_line.qty_delivered + self.added_delivered_qty
so_line.write({'qty_delivered': new_qty})
body = """
<p>Delivered qty updated on service line <b>%s</b>:
<ul>
<li>Added delivered qty: <b>%s</b></li>
<li>Total delivered qty: %s</li>
</ul></p>
""" % (self.name, self.added_delivered_qty, new_qty)
if self.comment:
body += '<p>Comment: %s</p>' % self.comment
so_line.order_id.message_post(body=body)
return super().process_line()

View File

@@ -1,64 +0,0 @@
===============================
Default Stock Warehouse on User
===============================
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-akretion%2Fodoo--usability-lightgray.png?logo=github
:target: https://github.com/akretion/odoo-usability/tree/12.0/stock_user_default_warehouse_base
:alt: akretion/odoo-usability
|badge1| |badge2| |badge3|
With this module, you will be able to configure a default warehouse in the preferences of the user.
This module doesn't do anything by itself. It should be used together with at least one of the following modules:
* stock_user_default_warehouse_sale
* stock_user_default_warehouse_purchase
* stock_user_default_warehouse_mrp
**Table of contents**
.. contents::
:local:
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/akretion/odoo-usability/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/akretion/odoo-usability/issues/new?body=module:%20stock_user_default_warehouse_base%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues.
Credits
=======
Authors
~~~~~~~
* Akretion
Contributors
~~~~~~~~~~~~
* Alexis de Lattre <alexis.delattre@akretion.com>
* Daniel Luque <dev@actgrupo.com>
Maintainers
~~~~~~~~~~~
This module is part of the `akretion/odoo-usability <https://github.com/akretion/odoo-usability/tree/12.0/stock_user_default_warehouse_base>`_ project on GitHub.
You are welcome to contribute.

View File

@@ -1,6 +0,0 @@
# © 2017 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 . import models
from . import wizard

View File

@@ -1,18 +0,0 @@
# © 2017 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': 'Default Stock Warehouse on User',
'version': '12.0.1.0.0',
'category': 'Inventory, Logistics, Warehousing',
'license': 'AGPL-3',
'summary': 'Configure a default warehouse on user',
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': ['stock'],
'data': [
'views/users_view.xml',
],
'installable': True,
}

View File

@@ -1,37 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_user_default_warehouse_base
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-05-19 10:02+0000\n"
"PO-Revision-Date: 2020-05-19 10:02+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: stock_user_default_warehouse_base
#: model:ir.model,name:stock_user_default_warehouse_base.model_stock_change_product_qty
msgid "Change Product Quantity"
msgstr "Cambiar cantidad de producto"
#. module: stock_user_default_warehouse_base
#: model:ir.model.fields,field_description:stock_user_default_warehouse_base.field_res_users__context_default_warehouse_id
msgid "Default Warehouse"
msgstr "Almacén por defecto"
#. module: stock_user_default_warehouse_base
#: model:ir.model.fields,help:stock_user_default_warehouse_base.field_res_users__context_default_warehouse_id
msgid "Default warehouse for sale orders (if the module stock_user_default_warehouse_sale is installed), purchase orders (if the module stock_user_default_warehouse_purchase is installed) and production orders (if the module stock_user_default_warehouse_mrp is installed)."
msgstr "Almacén por defecto para los pedidos de venta (si el módulo stock_user_default_warehouse_sale esta instalado), pedidos de compra (si el módulo stock_user_default_warehouse_purchase esta instalado) y pedidos de producción (si el módulo stock_user_default_warehouse_mrp esta instalado)."
#. module: stock_user_default_warehouse_base
#: model:ir.model,name:stock_user_default_warehouse_base.model_res_users
msgid "Users"
msgstr "Usuarios"

View File

@@ -1,5 +0,0 @@
# © 2017 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 . import res_users

View File

@@ -1,20 +0,0 @@
# © 2017 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 odoo import models, fields
class ResUsers(models.Model):
_inherit = 'res.users'
context_default_warehouse_id = fields.Many2one(
'stock.warehouse',
string='Default Warehouse',
company_dependent=True,
help="Default warehouse for sale orders (if the module "
"stock_user_default_warehouse_sale is installed), purchase orders "
"(if the module stock_user_default_warehouse_purchase is installed) "
"and production orders "
"(if the module stock_user_default_warehouse_mrp is installed)."
)

View File

@@ -1,2 +0,0 @@
* Alexis de Lattre <alexis.delattre@akretion.com>
* Daniel Luque <dev@actgrupo.com>

View File

@@ -1,7 +0,0 @@
With this module, you will be able to configure a default warehouse in the preferences of the user.
This module doesn't do anything by itself. It should be used together with at least one of the following modules:
* stock_user_default_warehouse_sale
* stock_user_default_warehouse_purchase
* stock_user_default_warehouse_mrp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

View File

@@ -1,421 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
<title>Default Stock Warehouse on User</title>
<style type="text/css">
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
border: 0 }
table.borderless td, table.borderless th {
/* Override padding for "table.docutils td" with "! important".
The right padding separates the table cells. */
padding: 0 0.5em 0 0 ! important }
.first {
/* Override more specific margin styles with "! important". */
margin-top: 0 ! important }
.last, .with-subtitle {
margin-bottom: 0 ! important }
.hidden {
display: none }
.subscript {
vertical-align: sub;
font-size: smaller }
.superscript {
vertical-align: super;
font-size: smaller }
a.toc-backref {
text-decoration: none ;
color: black }
blockquote.epigraph {
margin: 2em 5em ; }
dl.docutils dd {
margin-bottom: 0.5em }
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
overflow: hidden;
}
/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
font-weight: bold }
*/
div.abstract {
margin: 2em 5em }
div.abstract p.topic-title {
font-weight: bold ;
text-align: center }
div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
margin: 2em ;
border: medium outset ;
padding: 1em }
div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
font-weight: bold ;
font-family: sans-serif }
div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title, .code .error {
color: red ;
font-weight: bold ;
font-family: sans-serif }
/* Uncomment (and remove this text!) to get reduced vertical space in
compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
margin-bottom: 0.5em }
div.compound .compound-last, div.compound .compound-middle {
margin-top: 0.5em }
*/
div.dedication {
margin: 2em 5em ;
text-align: center ;
font-style: italic }
div.dedication p.topic-title {
font-weight: bold ;
font-style: normal }
div.figure {
margin-left: 2em ;
margin-right: 2em }
div.footer, div.header {
clear: both;
font-size: smaller }
div.line-block {
display: block ;
margin-top: 1em ;
margin-bottom: 1em }
div.line-block div.line-block {
margin-top: 0 ;
margin-bottom: 0 ;
margin-left: 1.5em }
div.sidebar {
margin: 0 0 0.5em 1em ;
border: medium outset ;
padding: 1em ;
background-color: #ffffee ;
width: 40% ;
float: right ;
clear: right }
div.sidebar p.rubric {
font-family: sans-serif ;
font-size: medium }
div.system-messages {
margin: 5em }
div.system-messages h1 {
color: red }
div.system-message {
border: medium outset ;
padding: 1em }
div.system-message p.system-message-title {
color: red ;
font-weight: bold }
div.topic {
margin: 2em }
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
margin-top: 0.4em }
h1.title {
text-align: center }
h2.subtitle {
text-align: center }
hr.docutils {
width: 75% }
img.align-left, .figure.align-left, object.align-left, table.align-left {
clear: left ;
float: left ;
margin-right: 1em }
img.align-right, .figure.align-right, object.align-right, table.align-right {
clear: right ;
float: right ;
margin-left: 1em }
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
table.align-center {
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left }
.align-center {
clear: both ;
text-align: center }
.align-right {
text-align: right }
/* reset inner alignment in figures */
div.align-right {
text-align: inherit }
/* div.align-center * { */
/* text-align: left } */
.align-top {
vertical-align: top }
.align-middle {
vertical-align: middle }
.align-bottom {
vertical-align: bottom }
ol.simple, ul.simple {
margin-bottom: 1em }
ol.arabic {
list-style: decimal }
ol.loweralpha {
list-style: lower-alpha }
ol.upperalpha {
list-style: upper-alpha }
ol.lowerroman {
list-style: lower-roman }
ol.upperroman {
list-style: upper-roman }
p.attribution {
text-align: right ;
margin-left: 50% }
p.caption {
font-style: italic }
p.credits {
font-style: italic ;
font-size: smaller }
p.label {
white-space: nowrap }
p.rubric {
font-weight: bold ;
font-size: larger ;
color: maroon ;
text-align: center }
p.sidebar-title {
font-family: sans-serif ;
font-weight: bold ;
font-size: larger }
p.sidebar-subtitle {
font-family: sans-serif ;
font-weight: bold }
p.topic-title {
font-weight: bold }
pre.address {
margin-bottom: 0 ;
margin-top: 0 ;
font: inherit }
pre.literal-block, pre.doctest-block, pre.math, pre.code {
margin-left: 2em ;
margin-right: 2em }
pre.code .ln { color: grey; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
pre.code .literal.string, code .literal.string { color: #0C5404 }
pre.code .name.builtin, code .name.builtin { color: #352B84 }
pre.code .deleted, code .deleted { background-color: #DEB0A1}
pre.code .inserted, code .inserted { background-color: #A3D289}
span.classifier {
font-family: sans-serif ;
font-style: oblique }
span.classifier-delimiter {
font-family: sans-serif ;
font-weight: bold }
span.interpreted {
font-family: sans-serif }
span.option {
white-space: nowrap }
span.pre {
white-space: pre }
span.problematic {
color: red }
span.section-subtitle {
/* font-size relative to parent (h1..h6 element) */
font-size: 80% }
table.citation {
border-left: solid 1px gray;
margin-left: 1px }
table.docinfo {
margin: 2em 4em }
table.docutils {
margin-top: 0.5em ;
margin-bottom: 0.5em }
table.footnote {
border-left: solid 1px black;
margin-left: 1px }
table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
padding-left: 0.5em ;
padding-right: 0.5em ;
vertical-align: top }
table.docutils th.field-name, table.docinfo th.docinfo-name {
font-weight: bold ;
text-align: left ;
white-space: nowrap ;
padding-left: 0 }
/* "booktabs" style (no vertical lines) */
table.docutils.booktabs {
border: 0px;
border-top: 2px solid;
border-bottom: 2px solid;
border-collapse: collapse;
}
table.docutils.booktabs * {
border: 0px;
}
table.docutils.booktabs th {
border-bottom: thin solid;
text-align: left;
}
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
font-size: 100% }
ul.auto-toc {
list-style-type: none }
</style>
</head>
<body>
<div class="document" id="default-stock-warehouse-on-user">
<h1 class="title">Default Stock Warehouse on User</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/akretion/odoo-usability/tree/12.0/stock_user_default_warehouse_base"><img alt="akretion/odoo-usability" src="https://img.shields.io/badge/github-akretion%2Fodoo--usability-lightgray.png?logo=github" /></a></p>
<p>With this module, you will be able to configure a default warehouse in the preferences of the user.</p>
<p>This module doesnt do anything by itself. It should be used together with at least one of the following modules:</p>
<ul class="simple">
<li>stock_user_default_warehouse_sale</li>
<li>stock_user_default_warehouse_purchase</li>
<li>stock_user_default_warehouse_mrp</li>
</ul>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#bug-tracker" id="id1">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id2">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id3">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id4">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="id5">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#id1">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/akretion/odoo-usability/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/akretion/odoo-usability/issues/new?body=module:%20stock_user_default_warehouse_base%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#id2">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#id3">Authors</a></h2>
<ul class="simple">
<li>Akretion</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#id4">Contributors</a></h2>
<ul class="simple">
<li>Alexis de Lattre &lt;<a class="reference external" href="mailto:alexis.delattre&#64;akretion.com">alexis.delattre&#64;akretion.com</a>&gt;</li>
<li>Daniel Luque &lt;<a class="reference external" href="mailto:dev&#64;actgrupo.com">dev&#64;actgrupo.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#id5">Maintainers</a></h2>
<p>This module is part of the <a class="reference external" href="https://github.com/akretion/odoo-usability/tree/12.0/stock_user_default_warehouse_base">akretion/odoo-usability</a> project on GitHub.</p>
<p>You are welcome to contribute.</p>
</div>
</div>
</div>
</body>
</html>

View File

@@ -1,28 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_users_form" model="ir.ui.view">
<field name="name">default_stock_warehouse.res.users.form</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form"/>
<field name="arch" type="xml">
<group name="preferences" position="inside">
<field name="context_default_warehouse_id"/>
</group>
</field>
</record>
<record id="view_users_form_simple_modif" model="ir.ui.view">
<field name="name">default_stock_warehouse.preferences.res.users.form</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form_simple_modif"/>
<field name="arch" type="xml">
<group name="preferences" position="inside">
<field name="context_default_warehouse_id" readonly="0"/>
</group>
</field>
</record>
</odoo>

View File

@@ -1,5 +0,0 @@
# © 2017 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 . import stock_change_product_qty

View File

@@ -1,17 +0,0 @@
# © 2017 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 odoo import models, api
class StockChangeProductQty(models.TransientModel):
_inherit = 'stock.change.product.qty'
@api.model
def default_get(self, fields_list):
res = super().default_get(fields_list)
if self.env.user.context_default_warehouse_id:
res['location_id'] = self.env.user.context_default_warehouse_id.\
lot_stock_id.id
return res

View File

@@ -1,58 +0,0 @@
===============================
Default Warehouse on User (MRP)
===============================
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-akretion%2Fodoo--usability-lightgray.png?logo=github
:target: https://github.com/akretion/odoo-usability/tree/12.0/stock_user_default_warehouse_mrp
:alt: akretion/odoo-usability
|badge1| |badge2| |badge3|
The default warehouse configured in the preferences of the user will be used by default on manufacturing orders.
**Table of contents**
.. contents::
:local:
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/akretion/odoo-usability/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/akretion/odoo-usability/issues/new?body=module:%20stock_user_default_warehouse_mrp%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues.
Credits
=======
Authors
~~~~~~~
* Akretion
Contributors
~~~~~~~~~~~~
* Alexis de Lattre <alexis.delattre@akretion.com>
* Daniel Luque <dev@actgrupo.com>
Maintainers
~~~~~~~~~~~
This module is part of the `akretion/odoo-usability <https://github.com/akretion/odoo-usability/tree/12.0/stock_user_default_warehouse_mrp>`_ project on GitHub.
You are welcome to contribute.

View File

@@ -1,5 +0,0 @@
# Copyright 2018 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 . import models

View File

@@ -1,15 +0,0 @@
# Copyright 2018 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': 'Default Warehouse on User (MRP)',
'version': '12.0.1.0.0',
'category': 'Manufacturing',
'license': 'AGPL-3',
'summary': "Use the users's default warehouse on manufacturing orders",
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': ['mrp', 'stock_user_default_warehouse_base'],
'installable': True,
}

View File

@@ -1,5 +0,0 @@
# Copyright 2018 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 . import mrp

View File

@@ -1,19 +0,0 @@
# Copyright 2018 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 odoo import models, fields, api
class MrpProduction(models.Model):
_inherit = 'mrp.production'
@api.model
def _default_pref_picking_type(self):
manu_type = self.env.user.context_default_warehouse_id.manu_type_id
return manu_type.id if manu_type else self._get_default_picking_type()
# No need to inherit the default value of location_src_id and
# location_dest_id because it is immediately over-ridden
# by the onchange of picking_type_id
picking_type_id = fields.Many2one(default=_default_pref_picking_type)

View File

@@ -1,2 +0,0 @@
* Alexis de Lattre <alexis.delattre@akretion.com>
* Daniel Luque <dev@actgrupo.com>

View File

@@ -1 +0,0 @@
The default warehouse configured in the preferences of the user will be used by default on manufacturing orders.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

View File

@@ -1,415 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
<title>Default Warehouse on User (MRP)</title>
<style type="text/css">
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
border: 0 }
table.borderless td, table.borderless th {
/* Override padding for "table.docutils td" with "! important".
The right padding separates the table cells. */
padding: 0 0.5em 0 0 ! important }
.first {
/* Override more specific margin styles with "! important". */
margin-top: 0 ! important }
.last, .with-subtitle {
margin-bottom: 0 ! important }
.hidden {
display: none }
.subscript {
vertical-align: sub;
font-size: smaller }
.superscript {
vertical-align: super;
font-size: smaller }
a.toc-backref {
text-decoration: none ;
color: black }
blockquote.epigraph {
margin: 2em 5em ; }
dl.docutils dd {
margin-bottom: 0.5em }
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
overflow: hidden;
}
/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
font-weight: bold }
*/
div.abstract {
margin: 2em 5em }
div.abstract p.topic-title {
font-weight: bold ;
text-align: center }
div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
margin: 2em ;
border: medium outset ;
padding: 1em }
div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
font-weight: bold ;
font-family: sans-serif }
div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title, .code .error {
color: red ;
font-weight: bold ;
font-family: sans-serif }
/* Uncomment (and remove this text!) to get reduced vertical space in
compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
margin-bottom: 0.5em }
div.compound .compound-last, div.compound .compound-middle {
margin-top: 0.5em }
*/
div.dedication {
margin: 2em 5em ;
text-align: center ;
font-style: italic }
div.dedication p.topic-title {
font-weight: bold ;
font-style: normal }
div.figure {
margin-left: 2em ;
margin-right: 2em }
div.footer, div.header {
clear: both;
font-size: smaller }
div.line-block {
display: block ;
margin-top: 1em ;
margin-bottom: 1em }
div.line-block div.line-block {
margin-top: 0 ;
margin-bottom: 0 ;
margin-left: 1.5em }
div.sidebar {
margin: 0 0 0.5em 1em ;
border: medium outset ;
padding: 1em ;
background-color: #ffffee ;
width: 40% ;
float: right ;
clear: right }
div.sidebar p.rubric {
font-family: sans-serif ;
font-size: medium }
div.system-messages {
margin: 5em }
div.system-messages h1 {
color: red }
div.system-message {
border: medium outset ;
padding: 1em }
div.system-message p.system-message-title {
color: red ;
font-weight: bold }
div.topic {
margin: 2em }
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
margin-top: 0.4em }
h1.title {
text-align: center }
h2.subtitle {
text-align: center }
hr.docutils {
width: 75% }
img.align-left, .figure.align-left, object.align-left, table.align-left {
clear: left ;
float: left ;
margin-right: 1em }
img.align-right, .figure.align-right, object.align-right, table.align-right {
clear: right ;
float: right ;
margin-left: 1em }
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
table.align-center {
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left }
.align-center {
clear: both ;
text-align: center }
.align-right {
text-align: right }
/* reset inner alignment in figures */
div.align-right {
text-align: inherit }
/* div.align-center * { */
/* text-align: left } */
.align-top {
vertical-align: top }
.align-middle {
vertical-align: middle }
.align-bottom {
vertical-align: bottom }
ol.simple, ul.simple {
margin-bottom: 1em }
ol.arabic {
list-style: decimal }
ol.loweralpha {
list-style: lower-alpha }
ol.upperalpha {
list-style: upper-alpha }
ol.lowerroman {
list-style: lower-roman }
ol.upperroman {
list-style: upper-roman }
p.attribution {
text-align: right ;
margin-left: 50% }
p.caption {
font-style: italic }
p.credits {
font-style: italic ;
font-size: smaller }
p.label {
white-space: nowrap }
p.rubric {
font-weight: bold ;
font-size: larger ;
color: maroon ;
text-align: center }
p.sidebar-title {
font-family: sans-serif ;
font-weight: bold ;
font-size: larger }
p.sidebar-subtitle {
font-family: sans-serif ;
font-weight: bold }
p.topic-title {
font-weight: bold }
pre.address {
margin-bottom: 0 ;
margin-top: 0 ;
font: inherit }
pre.literal-block, pre.doctest-block, pre.math, pre.code {
margin-left: 2em ;
margin-right: 2em }
pre.code .ln { color: grey; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
pre.code .literal.string, code .literal.string { color: #0C5404 }
pre.code .name.builtin, code .name.builtin { color: #352B84 }
pre.code .deleted, code .deleted { background-color: #DEB0A1}
pre.code .inserted, code .inserted { background-color: #A3D289}
span.classifier {
font-family: sans-serif ;
font-style: oblique }
span.classifier-delimiter {
font-family: sans-serif ;
font-weight: bold }
span.interpreted {
font-family: sans-serif }
span.option {
white-space: nowrap }
span.pre {
white-space: pre }
span.problematic {
color: red }
span.section-subtitle {
/* font-size relative to parent (h1..h6 element) */
font-size: 80% }
table.citation {
border-left: solid 1px gray;
margin-left: 1px }
table.docinfo {
margin: 2em 4em }
table.docutils {
margin-top: 0.5em ;
margin-bottom: 0.5em }
table.footnote {
border-left: solid 1px black;
margin-left: 1px }
table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
padding-left: 0.5em ;
padding-right: 0.5em ;
vertical-align: top }
table.docutils th.field-name, table.docinfo th.docinfo-name {
font-weight: bold ;
text-align: left ;
white-space: nowrap ;
padding-left: 0 }
/* "booktabs" style (no vertical lines) */
table.docutils.booktabs {
border: 0px;
border-top: 2px solid;
border-bottom: 2px solid;
border-collapse: collapse;
}
table.docutils.booktabs * {
border: 0px;
}
table.docutils.booktabs th {
border-bottom: thin solid;
text-align: left;
}
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
font-size: 100% }
ul.auto-toc {
list-style-type: none }
</style>
</head>
<body>
<div class="document" id="default-warehouse-on-user-mrp">
<h1 class="title">Default Warehouse on User (MRP)</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/akretion/odoo-usability/tree/12.0/stock_user_default_warehouse_mrp"><img alt="akretion/odoo-usability" src="https://img.shields.io/badge/github-akretion%2Fodoo--usability-lightgray.png?logo=github" /></a></p>
<p>The default warehouse configured in the preferences of the user will be used by default on manufacturing orders.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#bug-tracker" id="id1">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id2">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id3">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id4">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="id5">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#id1">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/akretion/odoo-usability/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/akretion/odoo-usability/issues/new?body=module:%20stock_user_default_warehouse_mrp%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#id2">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#id3">Authors</a></h2>
<ul class="simple">
<li>Akretion</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#id4">Contributors</a></h2>
<ul class="simple">
<li>Alexis de Lattre &lt;<a class="reference external" href="mailto:alexis.delattre&#64;akretion.com">alexis.delattre&#64;akretion.com</a>&gt;</li>
<li>Daniel Luque &lt;<a class="reference external" href="mailto:dev&#64;actgrupo.com">dev&#64;actgrupo.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#id5">Maintainers</a></h2>
<p>This module is part of the <a class="reference external" href="https://github.com/akretion/odoo-usability/tree/12.0/stock_user_default_warehouse_mrp">akretion/odoo-usability</a> project on GitHub.</p>
<p>You are welcome to contribute.</p>
</div>
</div>
</div>
</body>
</html>

View File

@@ -1,58 +0,0 @@
====================================
Default Warehouse on User (Purchase)
====================================
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-akretion%2Fodoo--usability-lightgray.png?logo=github
:target: https://github.com/akretion/odoo-usability/tree/12.0/stock_user_default_warehouse_purchase
:alt: akretion/odoo-usability
|badge1| |badge2| |badge3|
The default warehouse configured in the preferences of the user will be used by default for the picking type on purchase orders.
**Table of contents**
.. contents::
:local:
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/akretion/odoo-usability/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/akretion/odoo-usability/issues/new?body=module:%20stock_user_default_warehouse_purchase%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues.
Credits
=======
Authors
~~~~~~~
* Akretion
Contributors
~~~~~~~~~~~~
* Alexis de Lattre <alexis.delattre@akretion.com>
* Daniel Luque <dev@actgrupo.com>
Maintainers
~~~~~~~~~~~
This module is part of the `akretion/odoo-usability <https://github.com/akretion/odoo-usability/tree/12.0/stock_user_default_warehouse_purchase>`_ project on GitHub.
You are welcome to contribute.

View File

@@ -1,5 +0,0 @@
# © 2017 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 . import models

View File

@@ -1,15 +0,0 @@
# © 2017 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': 'Default Warehouse on User (Purchase)',
'version': '12.0.1.0.0',
'category': 'Purchases',
'license': 'AGPL-3',
'summary': "Use the users's default warehouse on purchase orders",
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': ['purchase', 'stock_user_default_warehouse_base'],
'installable': True,
}

View File

@@ -1,5 +0,0 @@
# © 2017 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 . import purchase

View File

@@ -1,16 +0,0 @@
# © 2017 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 odoo import models, fields, api
class PurchaseOrder(models.Model):
_inherit = 'purchase.order'
@api.model
def _default_pref_picking_type(self):
in_type = self.env.user.context_default_warehouse_id.in_type_id
return in_type.id if in_type else self._default_picking_type()
picking_type_id = fields.Many2one(default=_default_pref_picking_type)

View File

@@ -1,2 +0,0 @@
* Alexis de Lattre <alexis.delattre@akretion.com>
* Daniel Luque <dev@actgrupo.com>

View File

@@ -1 +0,0 @@
The default warehouse configured in the preferences of the user will be used by default for the picking type on purchase orders.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

View File

@@ -1,58 +0,0 @@
================================
Default Warehouse on User (Sale)
================================
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-akretion%2Fodoo--usability-lightgray.png?logo=github
:target: https://github.com/akretion/odoo-usability/tree/12.0/stock_user_default_warehouse_sale
:alt: akretion/odoo-usability
|badge1| |badge2| |badge3|
The default warehouse configured in the preferences of the user will be used by default on sale orders.
**Table of contents**
.. contents::
:local:
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/akretion/odoo-usability/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/akretion/odoo-usability/issues/new?body=module:%20stock_user_default_warehouse_sale%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues.
Credits
=======
Authors
~~~~~~~
* Akretion
Contributors
~~~~~~~~~~~~
* Alexis de Lattre <alexis.delattre@akretion.com>
* Daniel Luque <dev@actgrupo.com>
Maintainers
~~~~~~~~~~~
This module is part of the `akretion/odoo-usability <https://github.com/akretion/odoo-usability/tree/12.0/stock_user_default_warehouse_sale>`_ project on GitHub.
You are welcome to contribute.

View File

@@ -1,5 +0,0 @@
# © 2017 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 . import models

View File

@@ -1,15 +0,0 @@
# © 2017 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': 'Default Warehouse on User (Sale)',
'version': '12.0.1.0.0',
'category': 'Sale Management',
'license': 'AGPL-3',
'summary': "Use the users's default warehouse on sale orders",
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': ['sale_stock', 'stock_user_default_warehouse_base'],
'installable': True,
}

View File

@@ -1,5 +0,0 @@
# © 2017 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 . import sale

View File

@@ -1,19 +0,0 @@
# © 2017 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 odoo import models, fields, api
class SaleOrder(models.Model):
_inherit = 'sale.order'
@api.model
def _default_warehouse_id(self):
warehouse = self.env.user.context_default_warehouse_id
if not warehouse:
warehouse = self.env['stock.warehouse'].search(
[('company_id', '=', self.env.user.company_id.id)], limit=1)
return warehouse
warehouse_id = fields.Many2one(default=_default_warehouse_id)

View File

@@ -1,2 +0,0 @@
* Alexis de Lattre <alexis.delattre@akretion.com>
* Daniel Luque <dev@actgrupo.com>

View File

@@ -1 +0,0 @@
The default warehouse configured in the preferences of the user will be used by default on sale orders.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

View File

@@ -1,415 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
<title>Default Warehouse on User (Sale)</title>
<style type="text/css">
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
border: 0 }
table.borderless td, table.borderless th {
/* Override padding for "table.docutils td" with "! important".
The right padding separates the table cells. */
padding: 0 0.5em 0 0 ! important }
.first {
/* Override more specific margin styles with "! important". */
margin-top: 0 ! important }
.last, .with-subtitle {
margin-bottom: 0 ! important }
.hidden {
display: none }
.subscript {
vertical-align: sub;
font-size: smaller }
.superscript {
vertical-align: super;
font-size: smaller }
a.toc-backref {
text-decoration: none ;
color: black }
blockquote.epigraph {
margin: 2em 5em ; }
dl.docutils dd {
margin-bottom: 0.5em }
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
overflow: hidden;
}
/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
font-weight: bold }
*/
div.abstract {
margin: 2em 5em }
div.abstract p.topic-title {
font-weight: bold ;
text-align: center }
div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
margin: 2em ;
border: medium outset ;
padding: 1em }
div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
font-weight: bold ;
font-family: sans-serif }
div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title, .code .error {
color: red ;
font-weight: bold ;
font-family: sans-serif }
/* Uncomment (and remove this text!) to get reduced vertical space in
compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
margin-bottom: 0.5em }
div.compound .compound-last, div.compound .compound-middle {
margin-top: 0.5em }
*/
div.dedication {
margin: 2em 5em ;
text-align: center ;
font-style: italic }
div.dedication p.topic-title {
font-weight: bold ;
font-style: normal }
div.figure {
margin-left: 2em ;
margin-right: 2em }
div.footer, div.header {
clear: both;
font-size: smaller }
div.line-block {
display: block ;
margin-top: 1em ;
margin-bottom: 1em }
div.line-block div.line-block {
margin-top: 0 ;
margin-bottom: 0 ;
margin-left: 1.5em }
div.sidebar {
margin: 0 0 0.5em 1em ;
border: medium outset ;
padding: 1em ;
background-color: #ffffee ;
width: 40% ;
float: right ;
clear: right }
div.sidebar p.rubric {
font-family: sans-serif ;
font-size: medium }
div.system-messages {
margin: 5em }
div.system-messages h1 {
color: red }
div.system-message {
border: medium outset ;
padding: 1em }
div.system-message p.system-message-title {
color: red ;
font-weight: bold }
div.topic {
margin: 2em }
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
margin-top: 0.4em }
h1.title {
text-align: center }
h2.subtitle {
text-align: center }
hr.docutils {
width: 75% }
img.align-left, .figure.align-left, object.align-left, table.align-left {
clear: left ;
float: left ;
margin-right: 1em }
img.align-right, .figure.align-right, object.align-right, table.align-right {
clear: right ;
float: right ;
margin-left: 1em }
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
table.align-center {
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left }
.align-center {
clear: both ;
text-align: center }
.align-right {
text-align: right }
/* reset inner alignment in figures */
div.align-right {
text-align: inherit }
/* div.align-center * { */
/* text-align: left } */
.align-top {
vertical-align: top }
.align-middle {
vertical-align: middle }
.align-bottom {
vertical-align: bottom }
ol.simple, ul.simple {
margin-bottom: 1em }
ol.arabic {
list-style: decimal }
ol.loweralpha {
list-style: lower-alpha }
ol.upperalpha {
list-style: upper-alpha }
ol.lowerroman {
list-style: lower-roman }
ol.upperroman {
list-style: upper-roman }
p.attribution {
text-align: right ;
margin-left: 50% }
p.caption {
font-style: italic }
p.credits {
font-style: italic ;
font-size: smaller }
p.label {
white-space: nowrap }
p.rubric {
font-weight: bold ;
font-size: larger ;
color: maroon ;
text-align: center }
p.sidebar-title {
font-family: sans-serif ;
font-weight: bold ;
font-size: larger }
p.sidebar-subtitle {
font-family: sans-serif ;
font-weight: bold }
p.topic-title {
font-weight: bold }
pre.address {
margin-bottom: 0 ;
margin-top: 0 ;
font: inherit }
pre.literal-block, pre.doctest-block, pre.math, pre.code {
margin-left: 2em ;
margin-right: 2em }
pre.code .ln { color: grey; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
pre.code .literal.string, code .literal.string { color: #0C5404 }
pre.code .name.builtin, code .name.builtin { color: #352B84 }
pre.code .deleted, code .deleted { background-color: #DEB0A1}
pre.code .inserted, code .inserted { background-color: #A3D289}
span.classifier {
font-family: sans-serif ;
font-style: oblique }
span.classifier-delimiter {
font-family: sans-serif ;
font-weight: bold }
span.interpreted {
font-family: sans-serif }
span.option {
white-space: nowrap }
span.pre {
white-space: pre }
span.problematic {
color: red }
span.section-subtitle {
/* font-size relative to parent (h1..h6 element) */
font-size: 80% }
table.citation {
border-left: solid 1px gray;
margin-left: 1px }
table.docinfo {
margin: 2em 4em }
table.docutils {
margin-top: 0.5em ;
margin-bottom: 0.5em }
table.footnote {
border-left: solid 1px black;
margin-left: 1px }
table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
padding-left: 0.5em ;
padding-right: 0.5em ;
vertical-align: top }
table.docutils th.field-name, table.docinfo th.docinfo-name {
font-weight: bold ;
text-align: left ;
white-space: nowrap ;
padding-left: 0 }
/* "booktabs" style (no vertical lines) */
table.docutils.booktabs {
border: 0px;
border-top: 2px solid;
border-bottom: 2px solid;
border-collapse: collapse;
}
table.docutils.booktabs * {
border: 0px;
}
table.docutils.booktabs th {
border-bottom: thin solid;
text-align: left;
}
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
font-size: 100% }
ul.auto-toc {
list-style-type: none }
</style>
</head>
<body>
<div class="document" id="default-warehouse-on-user-sale">
<h1 class="title">Default Warehouse on User (Sale)</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/akretion/odoo-usability/tree/12.0/stock_user_default_warehouse_sale"><img alt="akretion/odoo-usability" src="https://img.shields.io/badge/github-akretion%2Fodoo--usability-lightgray.png?logo=github" /></a></p>
<p>The default warehouse configured in the preferences of the user will be used by default on sale orders.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#bug-tracker" id="id1">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id2">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id3">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id4">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="id5">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#id1">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/akretion/odoo-usability/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/akretion/odoo-usability/issues/new?body=module:%20stock_user_default_warehouse_sale%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#id2">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#id3">Authors</a></h2>
<ul class="simple">
<li>Akretion</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#id4">Contributors</a></h2>
<ul class="simple">
<li>Alexis de Lattre &lt;<a class="reference external" href="mailto:alexis.delattre&#64;akretion.com">alexis.delattre&#64;akretion.com</a>&gt;</li>
<li>Daniel Luque &lt;<a class="reference external" href="mailto:dev&#64;actgrupo.com">dev&#64;actgrupo.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#id5">Maintainers</a></h2>
<p>This module is part of the <a class="reference external" href="https://github.com/akretion/odoo-usability/tree/12.0/stock_user_default_warehouse_sale">akretion/odoo-usability</a> project on GitHub.</p>
<p>You are welcome to contribute.</p>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,77 @@
=============================
Unit of Measure Manager Group
=============================
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-akretion%2Fodoo--usability-lightgray.png?logo=github
:target: https://github.com/akretion/odoo-usability/tree/12.0/uom_manager_group
:alt: akretion/odoo-usability
|badge1| |badge2| |badge3|
In Odoo, all a majority of modules "Managers" dealing with products (like Sales Manager,
Inventory Manager, Manufacturing Manager,...) have access rights to create/write/delete
Units of Measure whereas the Sale/Inventory/Manufacturing "Users" have only reading
rights... when part of the (misnamed) Technical group "Manage Multiple Units of Measure"
is activated.
This module helps to **clarify these UoM access rights** and groups by creating a new
group category called "Units of Measure" with two different groups :
- **User** : UoM fields are displayed but not Uom menus (Users are not allowed to create or modify UoM)
- **Manager** : display both fields and UoM menus
- and if nothing is selected, neither UoM fields nor menus are displayed
.. figure:: https://raw.githubusercontent.com/akretion/odoo-usability/12.0-mig-product-unit-manager-group/uom_manager_group/static/description/uom_manager_group-readme_1.png
By doing so, the module also remove create/write/delete rights from other module's
Managers in order to reserve these rights to the new "Units of Measure Manager" group :
.. figure:: https://raw.githubusercontent.com/akretion/odoo-usability/12.0-mig-product-unit-manager-group/uom_manager_group/static/description/uom_manager_group-readme_2.png
**Table of contents**
.. contents::
:local:
Usage
=====
Go to your User's Settings and select the desired acces right for the application
access "Units of Measure".
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/akretion/odoo-usability/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/akretion/odoo-usability/issues/new?body=module:%20uom_manager_group%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues.
Credits
=======
Authors
~~~~~~~
* Akretion
Maintainers
~~~~~~~~~~~
This module is part of the `akretion/odoo-usability <https://github.com/akretion/odoo-usability/tree/12.0/uom_manager_group>`_ project on GitHub.
You are welcome to contribute.

View File

@@ -0,0 +1,2 @@
# © 2017 Chafique DELLI @ Akretion
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

View File

@@ -0,0 +1,17 @@
# © 2017 Chafique DELLI @ Akretion
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Unit of Measure Manager Group",
"version": "12.0.1.0.0",
"license": "AGPL-3",
"author": "Akretion",
"website": "http://akretion.com",
"depends": ["sale", "purchase", "mrp"],
"data": [
"data/ir_module_category_data.xml",
"security/product_security.xml",
"security/ir.model.access.csv",
"views/product_view.xml",
],
"installable": True,
}

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="module_category_uom" model="ir.module.category">
<field name="name">Units of Measure</field>
<field name="description">Enable using any units of measure</field>
<field name="sequence">0</field>
</record>
</odoo>

View File

@@ -0,0 +1,29 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * uom_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: uom_manager_group
#: model:res.groups,comment:uom_manager_group.group_uom_manager
#: model:res.groups,name:uom_manager_group.group_uom_manager
msgid "Manage Multiple Units of Measure"
msgstr "Gérer plusieurs unités de mesure"
#. module: uom_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"

View File

View File

@@ -0,0 +1,20 @@
In Odoo, all a majority of modules "Managers" dealing with products (like Sales Manager,
Inventory Manager, Manufacturing Manager,...) have access rights to create/write/delete
Units of Measure whereas the Sale/Inventory/Manufacturing "Users" have only reading
rights... when part of the (misnamed) Technical group "Manage Multiple Units of Measure"
is activated.
This module helps to **clarify these UoM access rights** and groups by creating a new
group category called "Units of Measure" with two different groups :
- **User** : UoM fields are displayed but not Uom menus (Users are not allowed to create or modify UoM)
- **Manager** : display both fields and UoM menus
- and if nothing is selected, neither UoM fields nor menus are displayed
.. figure:: ../static/description/uom_manager_group-readme_1.png
By doing so, the module also remove create/write/delete rights from other module's
Managers in order to reserve these rights to the new "Units of Measure Manager" group :
.. figure:: ../static/description/uom_manager_group-readme_2.png

View File

View File

@@ -0,0 +1,2 @@
Go to your User's Settings and select the desired acces right for the application
access "Units of Measure".

View File

@@ -0,0 +1,15 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_uom_uom_manager,uom.uom.manager,uom.model_uom_uom,group_uom_manager,1,1,1,1
access_uom_category_manager,uom.category.manager,uom.model_uom_category,group_uom_manager,1,1,1,1
access_uom_uom_user,uom.uom.user,uom.model_uom_uom,uom.group_uom,1,0,0,0
access_uom_uom_categ_user,uom.uom.categ.user,uom.model_uom_category,uom.group_uom,1,0,0,0
uom.access_uom_category_manager,uom.category.manager,uom.model_uom_category,base.group_system,1,0,0,0
uom.access_uom_uom_manager,uom.uom.manager,uom.model_uom_uom,base.group_system,1,0,0,0
sale.access_uom_uom_sale_manager,uom.uom salemanager,uom.model_uom_uom,sales_team.group_sale_manager,1,0,0,0
sale.access_uom_category_sale_manager,uom.category salemanager,uom.model_uom_category,sales_team.group_sale_manager,1,0,0,0
purchase.access_uom_uom_purchase_manager,uom.uom purchase_manager,uom.model_uom_uom,purchase.group_purchase_manager,1,0,0,0
purchase.access_uom_category_purchase_manager,uom.category purchase_manager,uom.model_uom_category,purchase.group_purchase_manager,1,0,0,0
mrp.access_uom_uom_mrp_manager,uom.uom mrp_manager,uom.model_uom_uom,mrp.group_mrp_manager,1,0,0,0
mrp.access_uom_category_mrp_manager,uom.category mrp_manager,uom.model_uom_category,mrp.group_mrp_manager,1,0,0,0
stock.access_uom_uom_stock_manager,uom.uom stock_manager,uom.model_uom_uom,stock.group_stock_manager,1,0,0,0
stock.access_uom_category_stock_manager,uom.category stock_manager,uom.model_uom_category,stock.group_stock_manager,1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_uom_uom_manager uom.uom.manager uom.model_uom_uom group_uom_manager 1 1 1 1
3 access_uom_category_manager uom.category.manager uom.model_uom_category group_uom_manager 1 1 1 1
4 access_uom_uom_user uom.uom.user uom.model_uom_uom uom.group_uom 1 0 0 0
5 access_uom_uom_categ_user uom.uom.categ.user uom.model_uom_category uom.group_uom 1 0 0 0
6 uom.access_uom_category_manager uom.category.manager uom.model_uom_category base.group_system 1 0 0 0
7 uom.access_uom_uom_manager uom.uom.manager uom.model_uom_uom base.group_system 1 0 0 0
8 sale.access_uom_uom_sale_manager uom.uom salemanager uom.model_uom_uom sales_team.group_sale_manager 1 0 0 0
9 sale.access_uom_category_sale_manager uom.category salemanager uom.model_uom_category sales_team.group_sale_manager 1 0 0 0
10 purchase.access_uom_uom_purchase_manager uom.uom purchase_manager uom.model_uom_uom purchase.group_purchase_manager 1 0 0 0
11 purchase.access_uom_category_purchase_manager uom.category purchase_manager uom.model_uom_category purchase.group_purchase_manager 1 0 0 0
12 mrp.access_uom_uom_mrp_manager uom.uom mrp_manager uom.model_uom_uom mrp.group_mrp_manager 1 0 0 0
13 mrp.access_uom_category_mrp_manager uom.category mrp_manager uom.model_uom_category mrp.group_mrp_manager 1 0 0 0
14 stock.access_uom_uom_stock_manager uom.uom stock_manager uom.model_uom_uom stock.group_stock_manager 1 0 0 0
15 stock.access_uom_category_stock_manager uom.category stock_manager uom.model_uom_category stock.group_stock_manager 1 0 0 0

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo noupdate="0">
<record id="uom.group_uom" model="res.groups">
<field name="name">User</field>
<field name="comment">display and use UoM</field>
<field name="category_id" ref="uom_manager_group.module_category_uom"/>
</record>
<record id="group_uom_manager" model="res.groups">
<field name="name">Manager</field>
<field name="comment">display UoM menus, create UoM and modify them</field>
<field name="category_id" ref="uom_manager_group.module_category_uom"/>
<field name="users" eval="[(4, ref('base.user_root'))]"/>
<field name="implied_ids" eval="[(6, 0, [ref('uom.group_uom')])]"/>
</record>
</odoo>

View File

@@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
<title>Default Warehouse on User (Purchase)</title>
<title>Unit of Measure Manager Group</title>
<style type="text/css">
/*
@@ -360,53 +360,70 @@ ul.auto-toc {
</style>
</head>
<body>
<div class="document" id="default-warehouse-on-user-purchase">
<h1 class="title">Default Warehouse on User (Purchase)</h1>
<div class="document" id="unit-of-measure-manager-group">
<h1 class="title">Unit of Measure Manager Group</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/akretion/odoo-usability/tree/12.0/stock_user_default_warehouse_purchase"><img alt="akretion/odoo-usability" src="https://img.shields.io/badge/github-akretion%2Fodoo--usability-lightgray.png?logo=github" /></a></p>
<p>The default warehouse configured in the preferences of the user will be used by default for the picking type on purchase orders.</p>
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/akretion/odoo-usability/tree/12.0/uom_manager_group"><img alt="akretion/odoo-usability" src="https://img.shields.io/badge/github-akretion%2Fodoo--usability-lightgray.png?logo=github" /></a></p>
<p>In Odoo, all a majority of modules “Managers” dealing with products (like Sales Manager,
Inventory Manager, Manufacturing Manager,…) have access rights to create/write/delete
Units of Measure whereas the Sale/Inventory/Manufacturing “Users” have only reading
rights… when part of the (misnamed) Technical group “Manage Multiple Units of Measure”
is activated.</p>
<p>This module helps to <strong>clarify these UoM access rights</strong> and groups by creating a new
group category called “Units of Measure” with two different groups :</p>
<ul class="simple">
<li><strong>User</strong> : UoM fields are displayed but not Uom menus (Users are not allowed to create or modify UoM)</li>
<li><strong>Manager</strong> : display both fields and UoM menus</li>
<li>and if nothing is selected, neither UoM fields nor menus are displayed</li>
</ul>
<div class="figure">
<img alt="https://raw.githubusercontent.com/akretion/odoo-usability/12.0/uom_manager_group/static/description/uom_manager_group-readme_1.png" src="https://raw.githubusercontent.com/akretion/odoo-usability/12.0/uom_manager_group/static/description/uom_manager_group-readme_1.png" />
</div>
<p>By doing so, the module also remove create/write/delete rights from other modules
Managers in order to reserve these rights to the new “Units of Measure Manager” group :</p>
<div class="figure">
<img alt="https://raw.githubusercontent.com/akretion/odoo-usability/12.0/uom_manager_group/static/description/uom_manager_group-readme_2.png" src="https://raw.githubusercontent.com/akretion/odoo-usability/12.0/uom_manager_group/static/description/uom_manager_group-readme_2.png" />
</div>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#bug-tracker" id="id1">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id2">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id3">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id4">Contributors</a></li>
<li><a class="reference internal" href="#usage" id="id1">Usage</a></li>
<li><a class="reference internal" href="#bug-tracker" id="id2">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id3">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id4">Authors</a></li>
<li><a class="reference internal" href="#maintainers" id="id5">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#id1">Usage</a></h1>
<p>Go to your Users Settings and select the desired acces right for the application
access “Units of Measure”.</p>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#id1">Bug Tracker</a></h1>
<h1><a class="toc-backref" href="#id2">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/akretion/odoo-usability/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/akretion/odoo-usability/issues/new?body=module:%20stock_user_default_warehouse_purchase%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/akretion/odoo-usability/issues/new?body=module:%20uom_manager_group%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#id2">Credits</a></h1>
<h1><a class="toc-backref" href="#id3">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#id3">Authors</a></h2>
<h2><a class="toc-backref" href="#id4">Authors</a></h2>
<ul class="simple">
<li>Akretion</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#id4">Contributors</a></h2>
<ul class="simple">
<li>Alexis de Lattre &lt;<a class="reference external" href="mailto:alexis.delattre&#64;akretion.com">alexis.delattre&#64;akretion.com</a>&gt;</li>
<li>Daniel Luque &lt;<a class="reference external" href="mailto:dev&#64;actgrupo.com">dev&#64;actgrupo.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#id5">Maintainers</a></h2>
<p>This module is part of the <a class="reference external" href="https://github.com/akretion/odoo-usability/tree/12.0/stock_user_default_warehouse_purchase">akretion/odoo-usability</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/akretion/odoo-usability/tree/12.0/uom_manager_group">akretion/odoo-usability</a> project on GitHub.</p>
<p>You are welcome to contribute.</p>
</div>
</div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

View File

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="sale.next_id_16" model="ir.ui.menu">
<field name="groups_id"
eval="[(6, 0, [ref('uom_manager_group.group_uom_manager')])]" />
</record>
<record id="sale.menu_product_uom_form_action" model="ir.ui.menu">
<field name="groups_id"
eval="[(6, 0, [ref('uom_manager_group.group_uom_manager')])]" />
</record>
<record id="sale.menu_product_uom_categ_form_action" model="ir.ui.menu">
<field name="groups_id"
eval="[(6, 0, [ref('uom_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('uom_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('uom_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('uom_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('uom_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('uom_manager_group.group_uom_manager')])]" />
</record>
</odoo>