Initialize v16 branch

This commit is contained in:
Alexis de Lattre
2022-10-26 21:09:52 +02:00
parent deb37a1688
commit 9aac933dcb
88 changed files with 50 additions and 1047 deletions

View File

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

View File

@@ -1,23 +0,0 @@
# © 2016-2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Account Fiscal Position Payable Receivable",
"version": "12.0.1.0.0",
"category": "Accounting & Finance",
"license": "AGPL-3",
"summary": "Configure payable/receivable accounts on fiscal positions",
"description": """
Account Fiscal Position Payable Receivable
==========================================
This module allows to configure a special *Partner Receivable Account* and a special *Partner Payable Account* on fiscal positions. This is used in the onchange of the fiscal position of partners.
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
""",
"author": "Akretion",
"website": "http://www.akretion.com",
"depends": ["account"],
"data": ["views/account_fiscal_position_view.xml"],
"installable": False,
}

View File

@@ -1,2 +0,0 @@
from . import account_fiscal_position
from . import res_partner

View File

@@ -1,21 +0,0 @@
# © 2016-2017 Akretion (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 AccountFiscalPosition(models.Model):
_inherit = "account.fiscal.position"
receivable_account_id = fields.Many2one(
"account.account",
string="Partner Receivable Account",
company_dependent=True,
domain=[("internal_type", "=", "receivable")],
)
payable_account_id = fields.Many2one(
"account.account",
string="Partner Payable Account",
company_dependent=True,
domain=[("internal_type", "=", "payable")],
)

View File

@@ -1,25 +0,0 @@
# © 2016-2017 Akretion (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 ResPartner(models.Model):
_inherit = "res.partner"
@api.onchange("property_account_position_id")
def fiscal_position_receivable_payable_change(self):
fp = self.property_account_position_id
ipo = self.env["ir.property"]
if fp.receivable_account_id:
self.property_account_receivable_id = fp.receivable_account_id
else:
self.property_account_receivable_id = ipo.get(
"property_account_receivable_id", "res.partner"
)
if fp.payable_account_id:
self.property_account_payable_id = fp.payable_account_id
else:
self.property_account_payable_id = ipo.get(
"property_account_payable_id", "res.partner"
)

View File

@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
© 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<record id="view_account_position_form" model="ir.ui.view">
<field name="name">receivable_payable.fiscal_position_form</field>
<field name="model">account.fiscal.position</field>
<field name="inherit_id" ref="account.view_account_position_form" />
<field name="arch" type="xml">
<field name="company_id" position="after">
<field name="receivable_account_id"/>
<field name="payable_account_id"/>
</field>
</field>
</record>
</odoo>

View File

@@ -18,5 +18,5 @@
'wizard/account_move_update_view.xml', 'wizard/account_move_update_view.xml',
'views/account_move.xml', 'views/account_move.xml',
], ],
'installable': True, 'installable': False,
} }

View File

@@ -12,6 +12,6 @@
'website': 'https://github.com/akretion/odoo-usability', 'website': 'https://github.com/akretion/odoo-usability',
'depends': ['account_invoice_update_wizard', 'account_payment_partner'], 'depends': ['account_invoice_update_wizard', 'account_payment_partner'],
'data': ['wizard/account_move_update_view.xml'], 'data': ['wizard/account_move_update_view.xml'],
'installable': True, 'installable': False,
'auto_install': True, 'auto_install': True,
} }

View File

@@ -14,5 +14,5 @@
'data': [ 'data': [
'views/account_menu.xml', 'views/account_menu.xml',
], ],
'installable': True, 'installable': False,
} }

View File

@@ -25,5 +25,5 @@ I don't recommend the use of this module.
'data': [ 'data': [
'views/account_move.xml', 'views/account_move.xml',
], ],
'installable': True, 'installable': False,
} }

View File

@@ -40,5 +40,5 @@
'report/invoice_report.xml', 'report/invoice_report.xml',
], ],
'qweb': ['static/src/xml/account_payment.xml'], 'qweb': ['static/src/xml/account_payment.xml'],
'installable': True, 'installable': False,
} }

View File

@@ -13,5 +13,5 @@
# I depend on base_usability only for _report_company_legal_name() # I depend on base_usability only for _report_company_legal_name()
'depends': ['base_usability'], 'depends': ['base_usability'],
'data': ['company_view.xml'], 'data': ['company_view.xml'],
'installable': True, 'installable': False,
} }

View File

@@ -58,5 +58,5 @@ Limitation: when you want to have different access rights on these lists dependi
'security/ir.model.access.csv', 'security/ir.model.access.csv',
'views/dynamic_list.xml', 'views/dynamic_list.xml',
], ],
'installable': True, 'installable': False,
} }

View File

@@ -17,5 +17,5 @@ With this module, when Odoo sends an outgoing email, it adds the sender as Bcc (
'author': 'Akretion', 'author': 'Akretion',
'website': 'https://github.com/akretion/odoo-usability', 'website': 'https://github.com/akretion/odoo-usability',
'depends': ['base'], 'depends': ['base'],
'installable': True, 'installable': False,
} }

View File

@@ -26,6 +26,6 @@ It has been developped by brother Bernard from Barroux Abbey and Alexis de Lattr
'partner_phone_view.xml', 'partner_phone_view.xml',
'security/ir.model.access.csv', 'security/ir.model.access.csv',
], ],
'installable': True, 'installable': False,
'post_init_hook': 'migrate_to_partner_phone', 'post_init_hook': 'migrate_to_partner_phone',
} }

View File

@@ -22,5 +22,5 @@ Base Partner Reference
'website': 'http://www.akretion.com', 'website': 'http://www.akretion.com',
'depends': ['base'], 'depends': ['base'],
'data': ['views/res_partner.xml'], 'data': ['views/res_partner.xml'],
'installable': True, 'installable': False,
} }

View File

@@ -22,5 +22,5 @@
'views/ir_sequence.xml', 'views/ir_sequence.xml',
'views/ir_property.xml', 'views/ir_property.xml',
], ],
'installable': True, 'installable': False,
} }

View File

@@ -21,5 +21,5 @@ This module has been written by Alexis de Lattre from Akretion
'data': [ 'data': [
'views/crm_lead.xml', 'views/crm_lead.xml',
], ],
'installable': True, 'installable': False,
} }

View File

@@ -23,5 +23,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'data': [ 'data': [
'views/stock_picking.xml', 'views/stock_picking.xml',
], ],
'installable': True, 'installable': False,
} }

View File

@@ -21,5 +21,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'website': 'http://www.akretion.com', 'website': 'http://www.akretion.com',
'depends': ['web_m2x_options'], 'depends': ['web_m2x_options'],
'post_init_hook': 'web_m2x_options_create', 'post_init_hook': 'web_m2x_options_create',
'installable': True, 'installable': False,
} }

View File

@@ -16,5 +16,5 @@
'data': [ 'data': [
'views/hr_payroll_structure_type.xml', 'views/hr_payroll_structure_type.xml',
], ],
'installable': True, 'installable': False,
} }

View File

@@ -23,5 +23,5 @@ This module has been written by Alexis de Lattre from Akretion
'data': [ 'data': [
'views/link_tracker_click.xml', 'views/link_tracker_click.xml',
], ],
'installable': True, 'installable': False,
} }

View File

@@ -21,5 +21,5 @@ This module has been written by Alexis de Lattre from Akretion
'data': [ 'data': [
'data/mail.xml', 'data/mail.xml',
], ],
'installable': True, 'installable': False,
} }

View File

@@ -28,5 +28,5 @@ Small usability improvements on mails:
#'wizard/email_template_preview_view.xml', #'wizard/email_template_preview_view.xml',
#'wizard/mail_compose_message_view.xml', #'wizard/mail_compose_message_view.xml',
], ],
'installable': True, 'installable': False,
} }

View File

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

View File

@@ -1,33 +0,0 @@
# Copyright (C) 2016-2019 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'MRP Average Cost',
'version': '12.0.1.0.0', # WARNING: we'll probably not port this module to v14, because part of its feature is now provided by the module mrp_account
'category': 'Manufactuing',
'license': 'AGPL-3',
'summary': 'Update standard_price upon validation of a manufacturing order',
'description': """
MRP Average Cost
================
By default, the official stock module updates the standard_price of a product that has costing_method = 'average' when validating an incoming picking. But the official 'mrp' module doesn't do that when you validate a manufactuging order.
This module adds this feature : when you validate a manufacturing order of a product that has costing method = 'average', the standard_price of the product will be updated by taking into account the standard_price of each raw material and also a number of work hours defined on the BOM.
Together with this module, I recommend the use of my module product_usability, available in the same branch, which contains a backport of the model product.price.history from v8 to v7.
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
""",
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': ['mrp'],
'data': [
'security/mrp_average_cost_security.xml',
'security/ir.model.access.csv',
'data/mrp_data.xml',
'views/mrp_view.xml',
],
'installable': False,
}

View File

@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo noupdate="1">
<record forcecreate="True" id="labour_hours" model="decimal.precision">
<field name="name">Labour Hours</field>
<field name="digits">3</field>
</record>
<record id="phantom_update_product_standard_price" model="ir.cron">
<field name="name">Update Cost Price of products with Phantom BOM</field>
<field name="active" eval="False"/>
<field name="user_id" ref="base.user_root"/>
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="numbercall">-1</field> <!-- don't limit the number of calls -->
<field name="doall" eval="False"/>
<field name="model_id" ref="mrp.model_mrp_bom"/>
<field name="state">code</field>
<field name="code">model._phantom_update_product_standard_price()</field>
</record>
</odoo>

View File

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

View File

@@ -1,271 +0,0 @@
# Copyright (C) 2016-2019 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models, fields, api, _
import odoo.addons.decimal_precision as dp
from odoo.exceptions import UserError
from odoo.tools import float_compare, float_is_zero
import logging
logger = logging.getLogger(__name__)
class MrpBomLabourLine(models.Model):
_name = 'mrp.bom.labour.line'
_description = 'Labour lines on BOM'
bom_id = fields.Many2one(
comodel_name='mrp.bom',
string='Labour Lines',
ondelete='cascade')
labour_time = fields.Float(
string='Labour Time',
required=True,
digits=dp.get_precision('Labour Hours'),
help="Average labour time for the production of "
"items of the BOM, in hours.")
labour_cost_profile_id = fields.Many2one(
comodel_name='labour.cost.profile',
string='Labour Cost Profile',
required=True)
note = fields.Text(
string='Note')
_sql_constraints = [(
'labour_time_positive',
'CHECK (labour_time >= 0)',
"The value of the field 'Labour Time' must be positive or 0.")]
class MrpBom(models.Model):
_inherit = 'mrp.bom'
@api.depends(
'labour_line_ids.labour_time',
'labour_line_ids.labour_cost_profile_id.hour_cost')
def _compute_total_labour_cost(self):
for bom in self:
cost = 0.0
for lline in bom.labour_line_ids:
cost += lline.labour_time *\
lline.labour_cost_profile_id.hour_cost
bom.total_labour_cost = cost
@api.depends(
'bom_line_ids.product_id.standard_price',
'total_labour_cost', 'extra_cost')
def _compute_total_cost(self):
for bom in self:
comp_cost = 0.0
for line in bom.bom_line_ids:
comp_price = line.product_id.standard_price
comp_qty_product_uom = line.product_uom_id._compute_quantity(
line.product_qty, line.product_id.uom_id)
comp_cost += comp_price * comp_qty_product_uom
total_cost = comp_cost + bom.extra_cost + bom.total_labour_cost
bom.total_components_cost = comp_cost
bom.total_cost = total_cost
labour_line_ids = fields.One2many(
'mrp.bom.labour.line', 'bom_id', string='Labour Lines')
total_labour_cost = fields.Float(
compute='_compute_total_labour_cost', readonly=True,
digits=dp.get_precision('Product Price'),
string="Total Labour Cost", store=True)
extra_cost = fields.Float(
string='Extra Cost', track_visibility='onchange',
digits=dp.get_precision('Product Price'),
help="Extra cost for the production of the quantity of "
"items of the BOM, in company currency. "
"You can use this field to enter the cost of the consumables "
"that are used to produce the product but are not listed in "
"the BOM")
total_components_cost = fields.Float(
compute='_compute_total_cost', readonly=True,
digits=dp.get_precision('Product Price'),
string='Total Components Cost')
total_cost = fields.Float(
compute='_compute_total_cost', readonly=True,
string='Total Cost',
digits=dp.get_precision('Product Price'),
help="Total Cost = Total Components Cost + "
"Total Labour Cost + Extra Cost")
company_currency_id = fields.Many2one(
related='company_id.currency_id', string='Company Currency')
@api.model
def _phantom_update_product_standard_price(self):
logger.info('Start to auto-update cost price from phantom bom')
boms = self.search([('type', '=', 'phantom')])
boms.with_context(
product_price_history_origin='Automatic update of Phantom BOMs')\
.manual_update_product_standard_price()
logger.info('End of the auto-update cost price from phantom bom')
return True
def manual_update_product_standard_price(self):
if 'product_price_history_origin' not in self._context:
self = self.with_context(
product_price_history_origin='Manual update from BOM')
precision = self.env['decimal.precision'].precision_get(
'Product Price')
for bom in self:
wproduct = bom.product_id
if not wproduct:
wproduct = bom.product_tmpl_id
if float_compare(
wproduct.standard_price, bom.total_cost,
precision_digits=precision):
wproduct.with_context().write(
{'standard_price': bom.total_cost})
logger.info(
'Cost price updated to %s on product %s',
bom.total_cost, wproduct.display_name)
return True
class MrpBomLine(models.Model):
_inherit = 'mrp.bom.line'
standard_price = fields.Float(
related='product_id.standard_price',
readonly=True,
string='Standard Price')
class LabourCostProfile(models.Model):
_name = 'labour.cost.profile'
_inherit = ['mail.thread']
_description = 'Labour Cost Profile'
name = fields.Char(
string='Name',
required=True,
track_visibility='onchange')
hour_cost = fields.Float(
string='Cost per Hour',
required=True,
digits=dp.get_precision('Product Price'),
track_visibility='onchange',
help="Labour cost per hour per person in company currency")
company_id = fields.Many2one(
comodel_name='res.company',
string='Company',
required=True,
default=lambda self: self.env['res.company']._company_default_get())
company_currency_id = fields.Many2one(
related='company_id.currency_id',
readonly=True,
store=True,
string='Company Currency')
@api.depends('name', 'hour_cost', 'company_currency_id.symbol')
def name_get(self):
res = []
for record in self:
res.append((record.id, u'%s (%s %s)' % (
record.name, record.hour_cost,
record.company_currency_id.symbol)))
return res
class MrpProduction(models.Model):
_inherit = 'mrp.production'
unit_cost = fields.Float(
string='Unit Cost', readonly=True,
digits=dp.get_precision('Product Price'),
help="This cost per unit in the unit of measure of the product "
"in company currency takes into account "
"the cost of the raw materials and the labour cost defined on"
"the BOM.")
company_currency_id = fields.Many2one(
related='company_id.currency_id', readonly=True,
string='Company Currency')
def compute_order_unit_cost(self):
self.ensure_one()
mo_total_price = 0.0 # In the UoM of the M0
labor_cost_per_unit = 0.0 # In the UoM of the product
extra_cost_per_unit = 0.0 # In the UoM of the product
subcontract_cost_per_unit = 0.0
# I read the raw materials MO, not on BOM, in order to make
# it work with the "dynamic" BOMs (few raw material are auto-added
# on the fly on MO)
prec = self.env['decimal.precision'].precision_get(
'Product Unit of Measure')
for raw_smove in self.move_raw_ids:
# I don't filter on state, in order to make it work with
# partial productions
# For partial productions, mo.product_qty is not updated
# so we compute with fully qty and we compute with all raw
# materials (consumed or not), so it gives a good price
# per unit at the end
raw_price = raw_smove.product_id.standard_price
raw_material_cost = raw_price * raw_smove.product_qty
logger.info(
'MO %s product %s: raw_material_cost=%s',
self.name, raw_smove.product_id.display_name,
raw_material_cost)
mo_total_price += raw_material_cost
if self.bom_id:
bom = self.bom_id
# if not bom.total_labour_cost:
# raise orm.except_orm(
# _('Error:'),
# _("Total Labor Cost is 0 on bill of material '%s'.")
# % bom.name)
if float_is_zero(bom.product_qty, precision_digits=prec):
raise UserError(_(
"Missing Product Quantity on bill of material '%s'.")
% bom.display_name)
bom_qty_product_uom = bom.product_uom_id._compute_quantity(
bom.product_qty, bom.product_tmpl_id.uom_id)
assert bom_qty_product_uom > 0, 'BoM qty should be positive'
labor_cost_per_unit = bom.total_labour_cost / bom_qty_product_uom
extra_cost_per_unit = bom.extra_cost / bom_qty_product_uom
if bom.type == 'subcontract':
one_finished_move = self.env['stock.move'].search([
('production_id', '=', self.id),
('product_id', '=', self.product_id.id),
('move_dest_ids', '!=', False)], limit=1)
if one_finished_move:
subcontract_cost_per_unit = one_finished_move.move_dest_ids[0].price_unit
# mo_standard_price and labor_cost_per_unit are
# in the UoM of the product (not of the MO/BOM)
mo_qty_product_uom = self.product_uom_id._compute_quantity(
self.product_qty, self.product_id.uom_id)
assert mo_qty_product_uom > 0, 'MO qty should be positive'
mo_standard_price = mo_total_price / mo_qty_product_uom
logger.info(
'MO %s: labor_cost_per_unit=%s extra_cost_per_unit=%s '
'subcontract_cost_per_unit=%s',
self.name, labor_cost_per_unit, extra_cost_per_unit,
subcontract_cost_per_unit)
mo_standard_price += labor_cost_per_unit
mo_standard_price += extra_cost_per_unit
mo_standard_price += subcontract_cost_per_unit
return mo_standard_price
def post_inventory(self):
'''This is the method where _action_done() is called on finished move
So we write on 'price_unit' of the finished move and THEN we call
super() which will call _action_done() which itself calls
product_price_update_before_done()'''
for order in self:
if order.product_id.cost_method == 'average':
unit_cost = order.compute_order_unit_cost()
order.write({'unit_cost': unit_cost})
logger.info('MO %s: unit_cost=%s', order.name, unit_cost)
order.move_finished_ids.filtered(
lambda x: x.product_id == order.product_id).write({
'price_unit': unit_cost})
return super(MrpProduction, self).post_inventory()

View File

@@ -1,7 +0,0 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_labour_cost_profile_read,Read access on labour.cost.profile to MRP user,model_labour_cost_profile,mrp.group_mrp_user,1,0,0,0
access_labour_cost_profile_read_stock,Read access on labour.cost.profile to Stock user,model_labour_cost_profile,stock.group_stock_user,1,0,0,0
access_labour_cost_profile_full,Full access on labour.cost.profile to MRP manager,model_labour_cost_profile,mrp.group_mrp_manager,1,1,1,1
access_mrp_bom_labour_line_read,Read access on mrp.bom.labour.line to MRP user,model_mrp_bom_labour_line,mrp.group_mrp_user,1,0,0,0
access_mrp_bom_labour_line_read_stock,Read access on mrp.bom.labour.line to Stock user,model_mrp_bom_labour_line,stock.group_stock_user,1,0,0,0
access_mrp_bom_labour_line_full,Full access on mrp.bom.labour.line to MRP manager,model_mrp_bom_labour_line,mrp.group_mrp_manager,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_labour_cost_profile_read Read access on labour.cost.profile to MRP user model_labour_cost_profile mrp.group_mrp_user 1 0 0 0
3 access_labour_cost_profile_read_stock Read access on labour.cost.profile to Stock user model_labour_cost_profile stock.group_stock_user 1 0 0 0
4 access_labour_cost_profile_full Full access on labour.cost.profile to MRP manager model_labour_cost_profile mrp.group_mrp_manager 1 1 1 1
5 access_mrp_bom_labour_line_read Read access on mrp.bom.labour.line to MRP user model_mrp_bom_labour_line mrp.group_mrp_user 1 0 0 0
6 access_mrp_bom_labour_line_read_stock Read access on mrp.bom.labour.line to Stock user model_mrp_bom_labour_line stock.group_stock_user 1 0 0 0
7 access_mrp_bom_labour_line_full Full access on mrp.bom.labour.line to MRP manager model_mrp_bom_labour_line mrp.group_mrp_manager 1 1 1 1

View File

@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo noupdate="1">
<record id="labour_cost_profile_rule" model="ir.rule">
<field name="name">Labour Cost Profile multi-company</field>
<field name="model_id" ref="model_labour_cost_profile"/>
<field name="domain_force">['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]</field>
</record>
</odoo>

View File

@@ -1,128 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2016-2019 Akretion (http://www.akretion.com/)
@author Alexis de Lattre <alexis.delattre@akretion.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<record id="mrp_bom_form_view" model="ir.ui.view">
<field name="name">mrp_average_cost.mrp.bom.form</field>
<field name="model">mrp.bom</field>
<field name="inherit_id" ref="mrp.mrp_bom_form_view"/>
<field name="arch" type="xml">
<field name="picking_type_id" position="after">
<field name="total_components_cost" widget="monetary"
options="{'currency_field': 'company_currency_id'}"/>
<field name="total_labour_cost" widget="monetary"
options="{'currency_field': 'company_currency_id'}"/>
<field name="extra_cost" widget="monetary"
options="{'currency_field': 'company_currency_id'}"/>
<label for="total_cost"/>
<div>
<field name="total_cost" widget="monetary"
options="{'currency_field': 'company_currency_id'}"
class="oe_inline"/>
<button type="object" name="manual_update_product_standard_price"
string="Update Cost Price of Product" class="oe_link"/>
</div>
<field name="company_currency_id" invisible="1"/>
</field>
<notebook position="inside">
<page string="Labour" name="labour_lines">
<group name="labour_lines_grp">
<field name="labour_line_ids" nolabel="1"/>
</group>
</page>
</notebook>
<xpath expr="//field[@name='bom_line_ids']/tree/field[@name='operation_id']" position="after">
<field name="standard_price"/>
</xpath>
</field>
</record>
<record id="mrp_bom_labour_line_tree" model="ir.ui.view">
<field name="name">mrp_bom_labour_line.tree</field>
<field name="model">mrp.bom.labour.line</field>
<field name="arch" type="xml">
<tree string="Labour Lines" editable="bottom">
<field name="bom_id" invisible="not context.get('mrp_bom_labour_line_main_view')"/>
<field name="labour_time" string="Labour Time (hours)"/>
<field name="labour_cost_profile_id"/>
<field name="note"/>
</tree>
</field>
</record>
<record id="mrp_bom_labour_line_form" model="ir.ui.view">
<field name="name">mrp_bom_labour_line.form</field>
<field name="model">mrp.bom.labour.line</field>
<field name="arch" type="xml">
<form string="Labour Line">
<group name="main">
<field name="bom_id" invisible="not context.get('mrp_bom_labour_line_main_view')"/>
<label for="labour_time"/>
<div name="labour_time">
<field name="labour_time" class="oe_inline"/> hours
</div>
<field name="labour_cost_profile_id"/>
<field name="note"/>
</group>
</form>
</field>
</record>
<record id="labour_cost_profile_form" model="ir.ui.view">
<field name="name">labour_cost_profile_form</field>
<field name="model">labour.cost.profile</field>
<field name="arch" type="xml">
<form string="Labour Cost Profile">
<group name="main">
<field name="name"/>
<field name="hour_cost" widget="monetary" options="{'currency_field': 'company_currency_id'}"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="company_currency_id" invisible="1"/>
</group>
</form>
</field>
</record>
<record id="labour_cost_profile_tree" model="ir.ui.view">
<field name="name">labour_cost_profile_tree</field>
<field name="model">labour.cost.profile</field>
<field name="arch" type="xml">
<tree string="Labour Cost Profiles">
<field name="name"/>
<field name="hour_cost"/>
<field name="company_currency_id"/>
</tree>
</field>
</record>
<record id="labour_cost_profile_action" model="ir.actions.act_window">
<field name="name">Labour Cost Profile</field>
<field name="res_model">labour.cost.profile</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem id="labour_cost_profile_menu" action="labour_cost_profile_action"
parent="mrp.menu_mrp_configuration" sequence="200"/>
<record id="mrp_production_form_view" model="ir.ui.view">
<field name="name">mrp_average_cost.mrp_production_form</field>
<field name="inherit_id" ref="mrp.mrp_production_form_view"/>
<field name="model">mrp.production</field>
<field name="arch" type="xml">
<field name="availability" position="after">
<field name="unit_cost" widget="monetary" options="{'currency_field': 'company_currency_id'}" attrs="{'invisible': [('state', '!=', 'done')]}"/>
<field name="company_currency_id" invisible="1"/>
</field>
</field>
</record>
</odoo>

View File

@@ -1,30 +0,0 @@
# Copyright 2016-2019 Akretion France (http://www.akretion.com/)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'MRP No Product Template Menu',
'version': '12.0.1.0.0',
'category': 'Manufacturing',
'license': 'AGPL-3',
'summary': "Replace product.template menu entries by product.product menu",
'description': """
MRP No Product Template
=======================
This module replaces the menu entry for product.template by menu entries
for product.product in the *Manufacturing > Master Data* menu.
This module also switches to the tree view by default
for Product menu entries, instead of the kanban view.
This module has been written by Alexis de Lattre
from Akretion <alexis.delattre@akretion.com>.
""",
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': ['mrp', 'sale_purchase_no_product_template_menu'],
'auto_install': True,
'data': ['mrp_view.xml'],
'installable': False,
}

View File

@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2016-2019 Akretion France (http://www.akretion.com/)
@author: Alexis de Lattre <alexis.delattre@akretion.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<record id="product_product_action_mrp" model="ir.actions.act_window">
<field name="name">Products</field>
<field name="res_model">product.product</field>
<field name="view_mode">tree,form,kanban</field>
<field name="context">{'search_default_consumable': 1, 'default_type': 'product'}</field>
</record>
<record id="mrp.menu_mrp_product_form" model="ir.ui.menu">
<field name="action" ref="product_product_action_mrp"/>
</record>
</odoo>

View File

@@ -16,5 +16,5 @@
'views/product_template.xml', 'views/product_template.xml',
# 'report/mrp_report.xml' # TODO # 'report/mrp_report.xml' # TODO
], ],
'installable': True, 'installable': False,
} }

View File

@@ -21,5 +21,5 @@ This module has been written by Alexis de Lattre <alexis.delattre@akretion.com>
'website': 'http://www.akretion.com', 'website': 'http://www.akretion.com',
'depends': ['account'], 'depends': ['account'],
'data': ['views/res_partner.xml'], 'data': ['views/res_partner.xml'],
'installable': True, 'installable': False,
} }

View File

@@ -21,5 +21,5 @@ This module has been written by Alexis de Lattre <alexis.delattre@akretion.com>
'website': 'http://www.akretion.com', 'website': 'http://www.akretion.com',
'depends': ['base'], 'depends': ['base'],
'data': ['views/res_partner.xml'], 'data': ['views/res_partner.xml'],
'installable': True, 'installable': False,
} }

View File

@@ -21,5 +21,5 @@ This module has been written by Alexis de Lattre <alexis.delattre@akretion.com>
'website': 'http://www.akretion.com', 'website': 'http://www.akretion.com',
'depends': ['contacts'], 'depends': ['contacts'],
'data': ['views/res_partner.xml'], 'data': ['views/res_partner.xml'],
'installable': True, 'installable': False,
} }

View File

@@ -20,5 +20,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'website': 'http://www.akretion.com', 'website': 'http://www.akretion.com',
'depends': ['point_of_sale'], 'depends': ['point_of_sale'],
'data': ['pos_view.xml'], 'data': ['pos_view.xml'],
'installable': True, 'installable': False,
} }

View File

@@ -18,5 +18,5 @@
'data': [ 'data': [
'views/product_template.xml' 'views/product_template.xml'
], ],
'installable': True, 'installable': False,
} }

View File

@@ -33,5 +33,5 @@ Akretion:
"views/pos_session.xml", "views/pos_session.xml",
"views/product.xml", "views/product.xml",
], ],
"installable": True, "installable": False,
} }

View File

@@ -13,5 +13,5 @@
'website': 'http://www.akretion.com', 'website': 'http://www.akretion.com',
'depends': ['account'], 'depends': ['account'],
'data': ['product_view.xml'], 'data': ['product_view.xml'],
'installable': True, 'installable': False,
} }

View File

@@ -23,5 +23,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'security/product_security.xml', 'security/product_security.xml',
'security/ir.model.access.csv', 'security/ir.model.access.csv',
], ],
'installable': True, 'installable': False,
} }

View File

@@ -22,6 +22,6 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'data': [ 'data': [
'security/ir.model.access.csv', 'security/ir.model.access.csv',
], ],
'installable': True, 'installable': False,
'auto_install': True, 'auto_install': True,
} }

View File

@@ -37,5 +37,5 @@ And it reduces the start time of the Point of Sale !
'author': 'Akretion', 'author': 'Akretion',
'website': 'http://www.akretion.com', 'website': 'http://www.akretion.com',
'depends': ['product'], 'depends': ['product'],
'installable': True, 'installable': False,
} }

View File

@@ -47,5 +47,5 @@ This module has been written by Alexis de Lattre from Akretion
'views/product.xml', 'views/product.xml',
'data/barcode_sequence.xml', 'data/barcode_sequence.xml',
], ],
'installable': True, 'installable': False,
} }

View File

@@ -38,5 +38,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'views/product_config_menu.xml', 'views/product_config_menu.xml',
'views/product_category_view.xml', 'views/product_category_view.xml',
], ],
'installable': True, 'installable': False,
} }

View File

@@ -18,5 +18,5 @@
'data': [ 'data': [
'views/product_template.xml' 'views/product_template.xml'
], ],
'installable': True, 'installable': False,
} }

View File

@@ -25,5 +25,5 @@ Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for
'data': [ 'data': [
'views/stock_picking.xml', 'views/stock_picking.xml',
], ],
'installable': True, 'installable': False,
} }

View File

@@ -16,5 +16,5 @@
'views/purchase_report.xml', 'views/purchase_report.xml',
'views/account_move.xml', 'views/account_move.xml',
], ],
'installable': True, 'installable': False,
} }

View File

@@ -34,5 +34,5 @@ This module has been written by Alexis de Lattre from Akretion
'views/sale_order.xml', 'views/sale_order.xml',
'security/ir.model.access.csv', 'security/ir.model.access.csv',
], ],
'installable': True, 'installable': False,
} }

View File

@@ -1,31 +0,0 @@
# Copyright 2020 Akretion (https://www.akretion.com).
# @author Sébastien BEAU <sebastien.beau@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Sale no configurator button",
"summary": "Hide 'configure a product' from sale line",
"version": "12.0.1.0.0",
"category": "Usabability",
"website": "www.akretion.com",
"author": " Akretion",
"license": "AGPL-3",
"application": False,
"installable": False,
"external_dependencies": {
"python": [],
"bin": [],
},
"depends": [
"sale",
],
"data": [
"views/sale_view.xml",
],
"demo": [
],
"qweb": [
]
}

View File

@@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="sale_order_view_form" model="ir.ui.view">
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<xpath expr="//control/create[@groups='product.group_product_variant']" position="replace"/>
</field>
</record>
</odoo>

View File

@@ -11,7 +11,7 @@
"author": " Akretion", "author": " Akretion",
"license": "AGPL-3", "license": "AGPL-3",
"application": False, "application": False,
"installable": True, "installable": False,
"external_dependencies": { "external_dependencies": {
"python": [], "python": [],
"bin": [], "bin": [],

View File

@@ -11,7 +11,7 @@
"author": " Akretion", "author": " Akretion",
"license": "AGPL-3", "license": "AGPL-3",
"application": False, "application": False,
"installable": True, "installable": False,
"external_dependencies": { "external_dependencies": {
"python": [], "python": [],
"bin": [], "bin": [],

View File

@@ -25,5 +25,5 @@ This module has been written by Alexis de Lattre from Akretion
'views/stock_picking.xml', 'views/stock_picking.xml',
'security/ir.model.access.csv', 'security/ir.model.access.csv',
], ],
'installable': True, 'installable': False,
} }

View File

@@ -18,5 +18,5 @@ This module has been written by Alexis de Lattre from Akretion
'website': 'http://www.akretion.com', 'website': 'http://www.akretion.com',
'depends': ['sale_stock'], 'depends': ['sale_stock'],
'data': ['views/sale_order.xml'], 'data': ['views/sale_order.xml'],
'installable': True, 'installable': False,
} }

View File

@@ -18,5 +18,5 @@
'data': [ 'data': [
'views/product_template.xml' 'views/product_template.xml'
], ],
'installable': True, 'installable': False,
} }

View File

@@ -1,29 +0,0 @@
# Copyright 2015-2019 Akretion France (http://www.akretion.com/)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Sale Purchase No Product Template Menu",
"version": "14.0.1.0.0",
"category": "Sale and Purchase",
"license": "AGPL-3",
"summary": "Replace product.template menu entries by product.product menu entries",
"description": """
Sale Purchase No Product Template
=================================
This module replaces the menu entries for product.template by menu entries for product.product in the *Sales* and *Purchases* menu entries. With this module, the only menu entry for product.template is in the menu *Sales > Configuration > Product Categories and Attributes*.
This module also switches to the tree view by default for Product menu entries, instead of the kanban view.
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
""",
"author": "Akretion",
"website": "http://www.akretion.com",
"depends": [
"purchase",
"sale",
],
"data": ["view.xml"],
"installable": True,
}

View File

@@ -1,29 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_purchase_no_product_template_menu
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2022-03-28 17:19+0200\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"X-Generator: Poedit 3.0\n"
#. module: sale_purchase_no_product_template_menu
#: model:ir.ui.menu,name:sale_purchase_no_product_template_menu.sale_config_product_template_menu
msgid "Product Templates"
msgstr "Modèles d'article"
#. module: sale_purchase_no_product_template_menu
#: model:ir.actions.act_window,name:sale_purchase_no_product_template_menu.product_product_action_purchased
#: model:ir.actions.act_window,name:sale_purchase_no_product_template_menu.product_product_action_sell
msgid "Products"
msgstr "Articles"

View File

@@ -1,25 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_purchase_no_product_template_menu
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \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: sale_purchase_no_product_template_menu
#: model:ir.ui.menu,name:sale_purchase_no_product_template_menu.sale_config_product_template_menu
msgid "Product Templates"
msgstr ""
#. module: sale_purchase_no_product_template_menu
#: model:ir.actions.act_window,name:sale_purchase_no_product_template_menu.product_product_action_purchased
#: model:ir.actions.act_window,name:sale_purchase_no_product_template_menu.product_product_action_sell
msgid "Products"
msgstr ""

View File

@@ -1,63 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2015-2019 Akretion France (http://www.akretion.com/)
@author: Alexis de Lattre <alexis.delattre@akretion.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<!-- PURCHASE -->
<record id="product_product_action_purchased" model="ir.actions.act_window">
<field name="name">Products</field>
<field name="res_model">product.product</field>
<field name="view_mode">tree,form,kanban</field>
<field name="context">{'search_default_filter_to_purchase': 1}</field>
<field name="search_view_id" eval="False"/> <!-- Force empty -->
<field name="view_id" eval="False"/> <!-- Force empty -->
</record>
<record id="purchase.menu_procurement_partner_contact_form" model="ir.ui.menu">
<field name="action" ref="product_product_action_purchased"/>
</record>
<!-- SALE -->
<!-- I'd prefer to inherit product.product_normal_action_sell and
change the "name" field, but it doesn't work with translation,
so I redefine a new menu entry -->
<record id="product_product_action_sell" model="ir.actions.act_window">
<field name="name">Products</field>
<field name="res_model">product.product</field>
<field name="view_mode">tree,form,kanban</field>
<field name="context">{'search_default_filter_to_sell': 1}</field>
<field name="search_view_id" eval="False"/>
<field name="view_id" ref="product.product_product_tree_view"/>
<field name="search_view_id" ref="product.product_search_form_view"/>
</record>
<!-- To keep good translations, we re-use the product.template menu
entry and link it to product product -->
<record id="sale.menu_product_template_action" model="ir.ui.menu">
<!-- related action is "product.product_template_action" -->
<field name="action" ref="product_product_action_sell"/>
</record>
<record id="product.product_template_action" model="ir.actions.act_window">
<field name="name">Product Templates</field> <!-- native value is "Products" -->
<field name="view_mode">tree,form,kanban</field>
<field name="view_id" eval="False"/>
<field name="context">{}</field>
</record>
<!-- Create a product template menu entry in configuration -->
<menuitem id="sale_config_product_template_menu" action="product.product_template_action"
parent="sale.prod_config_main"/>
<record id="product.product_normal_action_sell" model="ir.actions.act_window">
<field name="view_mode">tree,form,kanban</field>
</record>
</odoo>

View File

@@ -28,5 +28,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'views/stock_move.xml', 'views/stock_move.xml',
'views/stock_picking.xml', 'views/stock_picking.xml',
], ],
'installable': True, 'installable': False,
} }

View File

@@ -26,5 +26,5 @@
'wizards/sale_invoice_discount_all_lines_view.xml', 'wizards/sale_invoice_discount_all_lines_view.xml',
'security/ir.model.access.csv', 'security/ir.model.access.csv',
], ],
'installable': True, 'installable': False,
} }

View File

@@ -23,5 +23,5 @@ This module has been written by Alexis de Lattre from Akretion
'website': 'http://www.akretion.com', 'website': 'http://www.akretion.com',
'depends': ['sales_team'], 'depends': ['sales_team'],
'data': [], 'data': [],
'installable': True, 'installable': False,
} }

View File

@@ -14,5 +14,6 @@
"sale_usability", "sale_usability",
], ],
"data": ["views/sale_views.xml"], "data": ["views/sale_views.xml"],
"installable": False,
"auto_install": True, "auto_install": True,
} }

View File

@@ -26,5 +26,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'views/stock_move.xml', 'views/stock_move.xml',
'views/product.xml', 'views/product.xml',
], ],
'installable': True, 'installable': False,
} }

View File

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

View File

@@ -1,18 +0,0 @@
# Copyright 2022 Akretion (https://www.akretion.com).
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Stock Inventory Usability",
"summary": "Stock inventory usability.",
"version": "14.0.1.0.1",
"development_status": "Mature",
"author": "Akretion",
"website": "https://github.com/akretion/odoo-usability",
"category": "Warehouse",
"depends": ["stock"],
"data": [
"views/stock_inventory.xml",
],
"license": "AGPL-3",
"installable": True,
"application": False,
}

View File

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

View File

@@ -1,17 +0,0 @@
# Copyright 2022 Akretion (https://www.akretion.com).
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import _, fields, models, api
from odoo.exceptions import UserError
class Inventory(models.Model):
_inherit = "stock.inventory"
prefill_counted_quantity = fields.Selection(default="zero")
estimated_inventory_lines = fields.Float(compute="_compute_estimated_inventory_lines") #store ?
@api.depends("location_ids", "product_ids")
def _compute_estimated_inventory_lines(self):
for inv in self:
inv.estimated_inventory_lines = len(inv._get_quantities())

View File

@@ -1,27 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2022 Akretion (https://www.akretion.com).
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
<record id="view_inventory_form" model="ir.ui.view">
<field
name="name"
>Inventory form view - stock_inventory_usability extension</field>
<field name="model">stock.inventory</field>
<field name="inherit_id" ref="stock.view_inventory_form" />
<field name="arch" type="xml">
<field name="prefill_counted_quantity" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<field name="exhausted" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<field name="accounting_date" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<field name="product_ids" position="after">
<field name="estimated_inventory_lines" readonly="1" states="draft"/>
</field>
</field>
</record>
</odoo>

View File

@@ -1,26 +0,0 @@
# Copyright 2019 Akretion France (http://www.akretion.com/)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'Stock No Product Template Menu',
'version': '12.0.1.0.0',
'category': 'Stock',
'license': 'AGPL-3',
'summary': "Replace product.template menu entries by product.product menu entries",
'description': """
Stock No Product Template
=========================
This module replaces the menu entries for product.template by menu entries for product.product in the *Inventory* menu entry. With this module, the only menu entry for product.template is in the menu *Sales > Configuration > Product Categories and Attributes*.
This module also switches to the tree view by default for Product menu entries, instead of the kanban view.
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
""",
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': ['stock'],
'data': ['view.xml'],
'installable': True,
}

View File

@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2015-2019 Akretion France (http://www.akretion.com/)
@author: Alexis de Lattre <alexis.delattre@akretion.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<!-- STOCK -->
<record id="stock.menu_product_variant_config_stock" model="ir.ui.menu">
<field name="action" ref="product.product_normal_action"/>
</record>
</odoo>

View File

@@ -21,5 +21,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'website': 'http://www.akretion.com', 'website': 'http://www.akretion.com',
'depends': ['stock'], 'depends': ['stock'],
'data': ['views/stock_picking_type.xml'], 'data': ['views/stock_picking_type.xml'],
'installable': True, 'installable': False,
} }

View File

@@ -18,5 +18,5 @@
'data': [ 'data': [
'views/product_template.xml' 'views/product_template.xml'
], ],
'installable': True, 'installable': False,
} }

View File

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

View File

@@ -1,24 +0,0 @@
# Copyright 2021 Akretion (https://www.akretion.com).
# @author Kévin Roche <kevin.roche@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Stock relation usability",
"summary": "SUMMARY",
"version": "14.0.1.0.0",
"category": "Inventory, Logistic, Storage",
"website": "http://www.akretion.com",
"author": "Akretion",
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": [
"stock",
"purchase",
],
"data": [
"views/stock_picking.xml",
],
"demo": [],
"qweb": [],
}

View File

@@ -1,2 +0,0 @@
from . import stock_move

View File

@@ -1,36 +0,0 @@
# Copyright (C) 2021 Akretion (<http://www.akretion.com>).
# @author Kévin Roche <kevin.roche@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class StockMove(models.Model):
_inherit = "stock.move"
location_dest_list = fields.Text(
string="Locations", compute="_compute_locations_dest_list"
)
@api.depends(
"move_line_ids", "move_line_ids.location_dest_id", "move_line_ids.qty_done"
)
def _compute_locations_dest_list(self):
for move in self:
data = []
separator = ", "
dest_list = move.move_line_ids.location_dest_id
for dest in dest_list:
lines_qty = move.move_line_ids.search(
[("move_id", "=", move.id), ("location_dest_id", "=", dest.id)]
).mapped("qty_done")
quantity = int(sum(lines_qty))
location = dest.name
data.append("{}: {}".format(quantity, location))
move.location_dest_list = separator.join(data)
def _compute_is_quantity_done_editable(self):
super()._compute_is_quantity_done_editable()
for move in self:
if len(move.move_line_ids) == 1 and move.show_details_visible:
move.is_quantity_done_editable = True

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="view_picking_form" model="ir.ui.view">
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.view_picking_form" />
<field name="arch" type="xml">
<xpath expr="//field[@name='product_uom']" position="after">
<field name="location_dest_list" />
</xpath>
<xpath expr="//field[@name='product_uom_qty']" position="attributes">
<attribute
name="attrs"
>{'column_invisible': [('parent.state', '=', 'done')]}</attribute>
</xpath>
</field>
</record>
</odoo>

View File

@@ -40,5 +40,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'security/ir.model.access.csv', 'security/ir.model.access.csv',
], ],
'post_init_hook': 'create_config_parameter_immediate_tranfer', 'post_init_hook': 'create_config_parameter_immediate_tranfer',
'installable': True, 'installable': False,
} }

View File

@@ -45,5 +45,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'views/stock_inventory.xml', 'views/stock_inventory.xml',
'views/stock_expiry_depreciation_rule.xml', 'views/stock_expiry_depreciation_rule.xml',
], ],
'installable': True, 'installable': False,
} }

View File

@@ -20,4 +20,5 @@
], ],
"data": ["views/web_tab_title.xml"], "data": ["views/web_tab_title.xml"],
"maintainers": ["rvalyi"], "maintainers": ["rvalyi"],
"installable": False,
} }