[IMP] pre-commit: first run on whole repo
This commit is contained in:
@@ -3,18 +3,18 @@
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
'name': 'MRP Usability',
|
||||
'version': '14.0.1.0.0',
|
||||
'category': 'Manufacturing',
|
||||
'license': 'AGPL-3',
|
||||
'summary': 'Usability improvements on manufacturing',
|
||||
'author': 'Akretion',
|
||||
'website': 'http://www.akretion.com',
|
||||
'depends': ['mrp'],
|
||||
'data': [
|
||||
'views/mrp_production.xml',
|
||||
'views/product_template.xml',
|
||||
# 'report/mrp_report.xml' # TODO
|
||||
"name": "MRP Usability",
|
||||
"version": "14.0.1.0.0",
|
||||
"category": "Manufacturing",
|
||||
"license": "AGPL-3",
|
||||
"summary": "Usability improvements on manufacturing",
|
||||
"author": "Akretion",
|
||||
"website": "https://github.com/OCA/odoo-usability",
|
||||
"depends": ["mrp"],
|
||||
"data": [
|
||||
"views/mrp_production.xml",
|
||||
"views/product_template.xml",
|
||||
# 'report/mrp_report.xml' # TODO
|
||||
],
|
||||
'installable': True,
|
||||
"installable": True,
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ from odoo import fields, models
|
||||
|
||||
|
||||
class MrpBom(models.Model):
|
||||
_inherit = 'mrp.bom'
|
||||
_inherit = "mrp.bom"
|
||||
|
||||
code = fields.Char(tracking=50)
|
||||
type = fields.Selection(tracking=20)
|
||||
|
||||
@@ -7,7 +7,7 @@ from odoo import api, models
|
||||
|
||||
|
||||
class MrpProduction(models.Model):
|
||||
_inherit = 'mrp.production'
|
||||
_inherit = "mrp.production"
|
||||
|
||||
# Method used by the report, inherited in this module
|
||||
@api.model
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
|
||||
<template id="report_mrporder" inherit_id="mrp.report_mrporder">
|
||||
@@ -8,12 +8,14 @@
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//table[1]//tbody//td[1]" position="before">
|
||||
<td t-if="has_serial_number"><span t-field="ml.lot_id"/></td>
|
||||
<td t-if="has_serial_number"><span t-field="ml.lot_id" /></td>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//div[hasclass('oe_structure')][2]" position="after">
|
||||
<t t-set="has_product_unavailable"
|
||||
t-value="any(o.move_raw_ids.filtered(lambda x: x.product_uom_qty > x.reserved_availability))"/>
|
||||
<t
|
||||
t-set="has_product_unavailable"
|
||||
t-value="any(o.move_raw_ids.filtered(lambda x: x.product_uom_qty > x.reserved_availability))"
|
||||
/>
|
||||
<h4 if="has_product_unavailable">
|
||||
These products were unavailable (or partially) while edition of this Manufacturing Order.
|
||||
Here is missing quantities.
|
||||
@@ -26,16 +28,21 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<t t-set="moves"
|
||||
t-value="o.move_raw_ids.filtered(lambda x: x.product_uom_qty > x.reserved_availability)"/>
|
||||
<t
|
||||
t-set="moves"
|
||||
t-value="o.move_raw_ids.filtered(lambda x: x.product_uom_qty > x.reserved_availability)"
|
||||
/>
|
||||
<t t-foreach="moves" t-as="m">
|
||||
<tr>
|
||||
<td>
|
||||
<span t-field="m.product_id"/>
|
||||
<span t-field="m.product_id" />
|
||||
</td>
|
||||
<td>
|
||||
<span t-esc="o.get_stock_move_sold_out_report(m)" t-if="m.state !='done'"/>
|
||||
<span t-field="m.product_uom" groups="uom.group_uom"/>
|
||||
<span
|
||||
t-esc="o.get_stock_move_sold_out_report(m)"
|
||||
t-if="m.state !='done'"
|
||||
/>
|
||||
<span t-field="m.product_uom" groups="uom.group_uom" />
|
||||
</td>
|
||||
</tr>
|
||||
</t>
|
||||
|
||||
@@ -1,30 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!--
|
||||
© 2016 Akretion (http://www.akretion.com/)
|
||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
|
||||
<odoo>
|
||||
|
||||
|
||||
<record id="mrp_production_form_view" model="ir.ui.view">
|
||||
<field name="name">usability.mrp.production.form</field>
|
||||
<field name="model">mrp.production</field>
|
||||
<field name="inherit_id" ref="mrp.mrp_production_form_view"/>
|
||||
<field name="inherit_id" ref="mrp.mrp_production_form_view" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//page[@name='miscellaneous']/group/group/field[@name='location_src_id']" position="replace"/>
|
||||
<xpath expr="//page[@name='miscellaneous']/group/group/field[@name='location_dest_id']" position="replace"/>
|
||||
<xpath
|
||||
expr="//page[@name='miscellaneous']/group/group/field[@name='location_src_id']"
|
||||
position="replace"
|
||||
/>
|
||||
<xpath
|
||||
expr="//page[@name='miscellaneous']/group/group/field[@name='location_dest_id']"
|
||||
position="replace"
|
||||
/>
|
||||
<field name="bom_id" position="after">
|
||||
<field name="location_src_id" groups="stock.group_stock_multi_locations" options="{'no_create': True}" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
|
||||
<field name="location_dest_id" groups="stock.group_stock_multi_locations" options="{'no_create': True}" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
|
||||
<field
|
||||
name="location_src_id"
|
||||
groups="stock.group_stock_multi_locations"
|
||||
options="{'no_create': True}"
|
||||
attrs="{'readonly': [('state', '!=', 'draft')]}"
|
||||
/>
|
||||
<field
|
||||
name="location_dest_id"
|
||||
groups="stock.group_stock_multi_locations"
|
||||
options="{'no_create': True}"
|
||||
attrs="{'readonly': [('state', '!=', 'draft')]}"
|
||||
/>
|
||||
</field>
|
||||
<xpath expr="//page[@name='miscellaneous']/group/group/field[@name='date_deadline']" position="after">
|
||||
<field name="date_start"/>
|
||||
<field name="date_finished"/>
|
||||
<xpath
|
||||
expr="//page[@name='miscellaneous']/group/group/field[@name='date_deadline']"
|
||||
position="after"
|
||||
>
|
||||
<field name="date_start" />
|
||||
<field name="date_finished" />
|
||||
</xpath>
|
||||
<button name="action_cancel" type="object" attrs="{'invisible': ['|', '|', ('id', '=', False), ('state', 'in', ('done', 'cancel')), ('confirm_cancel', '=', True)]}" position="attributes">
|
||||
<attribute name="confirm">Are you sure you want to cancel this manufacturing order?</attribute>
|
||||
<button
|
||||
name="action_cancel"
|
||||
type="object"
|
||||
attrs="{'invisible': ['|', '|', ('id', '=', False), ('state', 'in', ('done', 'cancel')), ('confirm_cancel', '=', True)]}"
|
||||
position="attributes"
|
||||
>
|
||||
<attribute
|
||||
name="confirm"
|
||||
>Are you sure you want to cancel this manufacturing order?</attribute>
|
||||
</button>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" ?>
|
||||
<odoo>
|
||||
|
||||
<record id="product_template_form_view_bom_button" model="ir.ui.view">
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!--
|
||||
Copyright 2016-2020 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="view_move_form" model="ir.ui.view">
|
||||
@@ -12,8 +11,8 @@
|
||||
<field name="inherit_id" ref="stock.view_move_form" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="origin" position="after">
|
||||
<field name="production_id"/>
|
||||
<field name="raw_material_production_id"/>
|
||||
<field name="production_id" />
|
||||
<field name="raw_material_production_id" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user