[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
This commit is contained in:
Robot Odoo
2018-11-26 12:46:49 +01:00
committed by GitHub
4 changed files with 7 additions and 4 deletions
+3 -3
View File
@@ -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"/>
+1
View File
@@ -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
@@ -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"/>
+2 -1
View File
@@ -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"/>