Kaynağa Gözat

[ADD] campo nro lote

deisy 5 yıl önce
ebeveyn
işleme
a208dbc4ad

BIN
models/res_partner.pyc


BIN
models/sis_stock_transfer.pyc


+ 4 - 2
models/sis_stock_transfer_line.py

@@ -60,7 +60,9 @@ class SisStockTransferLine(models.Model):
             string='Destination Location',
             compute='_get_transfer_locations',
             store=True)
-
+    lot_id = fields.Many2one(
+            comodel_name='stock.production.lot',
+            string='Lote/N° de serie')
 
     @api.one
     @api.onchange('product_id')
@@ -106,5 +108,5 @@ class SisStockTransferLine(models.Model):
             'location_dest_id' : self.dest_location.id,
             'picking_id' : picking.id,
             'group_id': group.id,
-            'note': self.note
+            'note': self.note,
         }

BIN
models/sis_stock_transfer_line.pyc


+ 3 - 1
views/sis_warehouse_transfer.xml

@@ -93,12 +93,14 @@
                         <field colspan="4" name="lines" nolabel="1" attrs="{'readonly':[('state','!=','draft')]}">
                             <tree editable="bottom">
                                 <field name="product_id" domain="[('type','!=','service')]" required="1" options="{'no_create':True,'no_open':True}"/>
-                                <field name="factory_reference" readonly="1"/>
+                                <field name="factory_reference" invisible="1"/>
                                 <field name="product_qty" required="1" sum="qty"/>
                                 <field name="product_uom_id" required="1" invisible="1"/>
                                 <field name="source_location" invisible="1"/>
                                 <field name="dest_location" invisible="1"/>
                                 <field name="note" invisible="1"/>
+                                <field name="lot_id" domain="[('product_id','=',product_id)]"/>
+
                             </tree>
                         </field>
                         <group>