summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorRobot Odoo <xmo+roboto@odoo.com>2018-11-26 12:46:49 +0100
committerGitHub <noreply@github.com>2018-11-26 12:46:49 +0100
commitdb0f80ee537424c15e1bd1852b2e1dbdbedf4fea (patch)
tree1c24900be886ae8b841faea873e64811caa41abc /addons
parent702317fbb87a3e4f3493d0cb6dc7b4093e81e201 (diff)
parentc5ce51168e002cf223909ab9e9c121370c2996f9 (diff)
[IMP] repair, stock: views improvements
Display destination and source location on picking tree view Order repair button with primary first in the list Add the source document on stock move line view Pad:https://pad.odoo.com/p/r.66fe9d8682b74783346d91b0fe7e3a87 Task:https://www.odoo.com/web?#id=1872294&action=333&active_id=131&model=project.task&view_type=form&menu_id=4720 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr closes odoo/odoo#26380
Diffstat (limited to 'addons')
-rw-r--r--addons/repair/views/repair_views.xml6
-rw-r--r--addons/stock/models/stock_move_line.py1
-rw-r--r--addons/stock/views/stock_move_line_views.xml1
-rw-r--r--addons/stock/views/stock_picking_views.xml3
4 files changed, 7 insertions, 4 deletions
diff --git a/addons/repair/views/repair_views.xml b/addons/repair/views/repair_views.xml
index ca2f0fd5aec..937301a7176 100644
--- a/addons/repair/views/repair_views.xml
+++ b/addons/repair/views/repair_views.xml
@@ -24,14 +24,14 @@
<field name="arch" type="xml">
<form string="Repair Order">
<header>
- <button name="action_send_mail" states="draft" string="Send Quotation" type="object"/>
- <button name="print_repair_order" states="draft" string="Print Quotation" type="object"/>
<button name="action_validate" states="draft" type="object" string="Confirm Repair" class="oe_highlight"/>
<button name="action_repair_start" attrs="{'invisible': ['&amp;', ('state','!=','confirmed'), '!', '&amp;', ('state','=','ready'), ('invoice_method','=','b4repair')]}"
type="object" string="Start Repair" class="oe_highlight"/>
- <button name="action_repair_cancel_draft" states="cancel" string="Set to Draft" type="object"/>
<button name="action_repair_end" states="under_repair" type="object" string="End Repair" class="oe_highlight"/>
<button name="action_repair_invoice_create" states="2binvoiced" type="object" string="Create Invoice" class="oe_highlight" groups="account.group_account_invoice"/>
+ <button name="action_send_mail" states="draft" string="Send Quotation" type="object"/>
+ <button name="print_repair_order" states="draft" string="Print Quotation" type="object"/>
+ <button name="action_repair_cancel_draft" states="cancel" string="Set to Draft" type="object"/>
<button name="action_repair_cancel" string="Cancel Repair" type="object" attrs="{'invisible':['|',('invoice_method','!=','none'), ('state', 'not in',('confirmed','2binvoiced','ready','under_repair'))]}"/>
<button name="action_repair_cancel" states="draft" type="object" string="Cancel Repair"/>
<field name="state" widget="statusbar" statusbar_visible="draft,confirmed,done"/>
diff --git a/addons/stock/models/stock_move_line.py b/addons/stock/models/stock_move_line.py
index 3ab4b4a2263..96f8b4cb05a 100644
--- a/addons/stock/models/stock_move_line.py
+++ b/addons/stock/models/stock_move_line.py
@@ -51,6 +51,7 @@ class StockMoveLine(models.Model):
produce_line_ids = fields.Many2many('stock.move.line', 'stock_move_line_consume_rel', 'produce_line_id', 'consume_line_id', help="Technical link to see which line was produced with this. ")
reference = fields.Char(related='move_id.reference', store=True, related_sudo=False, readonly=False)
tracking = fields.Selection(related='product_id.tracking', readonly=True)
+ origin = fields.Char(related='move_id.origin', string='Source')
picking_type_entire_packs = fields.Boolean(related='picking_id.picking_type_id.show_entire_packs', readonly=True)
@api.one
diff --git a/addons/stock/views/stock_move_line_views.xml b/addons/stock/views/stock_move_line_views.xml
index d0adb2caf08..a76db3150c1 100644
--- a/addons/stock/views/stock_move_line_views.xml
+++ b/addons/stock/views/stock_move_line_views.xml
@@ -30,6 +30,7 @@
<group>
<field name="date"/>
<field name="reference" string="Reference"/>
+ <field name="origin"/>
<field name="product_id"/>
<field name="location_id" groups="stock.group_stock_multi_locations"/>
<field name="location_dest_id" groups="stock.group_stock_multi_locations"/>
diff --git a/addons/stock/views/stock_picking_views.xml b/addons/stock/views/stock_picking_views.xml
index 6cfb17a39e7..402cfeae420 100644
--- a/addons/stock/views/stock_picking_views.xml
+++ b/addons/stock/views/stock_picking_views.xml
@@ -183,7 +183,8 @@
<field name="arch" type="xml">
<tree decoration-info="state == 'draft'" decoration-muted="state == 'cancel'" decoration-danger="state not in ('cancel', 'done') and scheduled_date &lt; current_date" string="Picking list">
<field name="name"/>
- <field name="location_dest_id" groups="stock.group_stock_multi_locations"/>
+ <field name="location_id" string="From" groups="stock.group_stock_multi_locations"/>
+ <field name="location_dest_id" string="To" groups="stock.group_stock_multi_locations"/>
<field name="partner_id"/>
<field name="date" invisible="1"/>
<field name="scheduled_date"/>