diff --git a/README.rst b/README.rst index 235911b0fef4f1a06506cbecd3cd968ffb21c94b..497909d75a574e0d753d446091f8c5fbfa5d712c 100755 --- a/README.rst +++ b/README.rst @@ -10,6 +10,7 @@ Fumaison Occ - Vente - Ce module hérite du module *product* et ajoute un champ EAN7 sur les articles champs au modèle *product.product* - Ajout de champs venant de *fumoc_partner* sur *sale_order* - Ajout de la note de facturation et de la DLC des lots dans les factures pdf +- Ajout de la DLC dans la vue détaillée des opérations sur le bon de livraison Description =========== diff --git a/__manifest__.py b/__manifest__.py index 0e131a4045d7ff96af634ba3112759dd9586557b..7b61921a3f08784be1c4c8500cc60ffffed52c2f 100755 --- a/__manifest__.py +++ b/__manifest__.py @@ -17,6 +17,7 @@ # views 'views/product_views.xml', 'views/sale_order.xml', + 'views/stock_move_line.xml', 'views/stock_picking.xml', # reports 'report/report_deliveryslip.xml', diff --git a/views/stock_move_line.xml b/views/stock_move_line.xml new file mode 100644 index 0000000000000000000000000000000000000000..50c65612c2521eb1aa2e6354bd2cb9d7fe902bec --- /dev/null +++ b/views/stock_move_line.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright 2021 Le Filament + License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). --> +<odoo> + <data> + + <record id="fumoc_stock_move_line_detailed_operation_tree_inherit" model="ir.ui.view"> + <field name="name">fumoc_sale.stock.move.line.tree</field> + <field name="model">stock.move.line</field> + <field name="inherit_id" ref="product_expiry.view_stock_move_line_detailed_operation_tree_expiry"/> + <field name="priority" eval="8"/> + <field name="arch" type="xml"> + <xpath expr="//field[@name='expiration_date']" position="attributes"> + <attribute name="string">DLC</attribute> + <attribute name="attrs">{'column_invisible': [('parent.show_lots_text', '=', True)]}</attribute> + <attribute name="widget">date</attribute> + </xpath> + </field> + </record> + + </data> +</odoo> diff --git a/views/stock_picking.xml b/views/stock_picking.xml index c19036dc301a81063126098ea54329dfe4c2d756..c660eb23d3ff358534c01dfba423e8b08ecf3c3a 100644 --- a/views/stock_picking.xml +++ b/views/stock_picking.xml @@ -10,12 +10,24 @@ <field name="inherit_id" ref="stock.view_picking_form"/> <field name="priority" eval="8"/> <field name="arch" type="xml"> + <xpath expr="//page[@name='extra']//group[@name='other_infos']" position="after"> <group string="Infos Livraison" name="delivery_infos"> <field name="res_transporter_id"/> <field name="packaging_id"/> </group> </xpath> + + <xpath expr="//field[@name='move_line_ids_without_package']" position="attributes"> + <attribute name="context">{ + 'tree_view_ref': 'fumoc_sale.fumoc_stock_move_line_detailed_operation_tree_inherit', + 'default_picking_id': id, + 'default_location_id': location_id, + 'default_location_dest_id': location_dest_id, + 'default_company_id': company_id + }</attribute> + </xpath> + </field> </record>