Remove scanned quantities in shipment in return

043957
This commit is contained in:
Raimon Esteve 2021-05-12 12:19:10 +02:00
parent ddf559dd7e
commit 5814b237c3
5 changed files with 1 additions and 76 deletions

View file

@ -9,7 +9,6 @@ def register():
stock.Configuration,
stock.Move,
stock.ShipmentIn,
stock.ShipmentInReturn,
stock.ShipmentOut,
stock.ShipmentOutReturn,
module='stock_scanner', type_='model')

View file

@ -10,10 +10,6 @@ msgctxt "field:stock.configuration,scanner_on_shipment_in:"
msgid "Scanner on Supplier Shipments?"
msgstr "Escanejat a albarans de proveïdor?"
msgctxt "field:stock.configuration,scanner_on_shipment_in_return:"
msgid "Scanner on Supplier Return Shipments?"
msgstr "Escanejat a devolucions a proveïdor?"
msgctxt "field:stock.configuration,scanner_on_shipment_out:"
msgid "Scanner on Customer Shipments?"
msgstr "Escanejat albarans de client?"
@ -203,15 +199,6 @@ msgctxt "model:ir.model.button,string:shipment_in_reset_button"
msgid "Reset Scanned Quantities"
msgstr "Reestableix quantitats escanejades"
msgctxt ""
"model:ir.model.button,string:shipment_in_return_reset_scanned_quantities_button"
msgid "Reset Scanned Quantities"
msgstr "Reestableix quantitats escanejades"
msgctxt "model:ir.model.button,string:shipment_in_return_scan_all_button"
msgid "Scan All"
msgstr "Escaneja tot"
msgctxt "model:ir.model.button,string:shipment_in_scan_all_button"
msgid "Scan All"
msgstr "Escaneja tot"

View file

@ -10,10 +10,6 @@ msgctxt "field:stock.configuration,scanner_on_shipment_in:"
msgid "Scanner on Supplier Shipments?"
msgstr "¿Escaneado en albaranes de proveedor?"
msgctxt "field:stock.configuration,scanner_on_shipment_in_return:"
msgid "Scanner on Supplier Return Shipments?"
msgstr "¿Escaneado en devoluciones a proveedor?"
msgctxt "field:stock.configuration,scanner_on_shipment_out:"
msgid "Scanner on Customer Shipments?"
msgstr "¿Escaneado en albaranes de cliente?"
@ -204,15 +200,6 @@ msgctxt "model:ir.model.button,string:shipment_in_reset_button"
msgid "Reset Scanned Quantities"
msgstr "Reestablecer cantidad escaneada"
msgctxt ""
"model:ir.model.button,string:shipment_in_return_reset_scanned_quantities_button"
msgid "Reset Scanned Quantities"
msgstr "Reestablecer cantidad escaneada"
msgctxt "model:ir.model.button,string:shipment_in_return_scan_all_button"
msgid "Scan All"
msgstr "Escanear todo"
msgctxt "model:ir.model.button,string:shipment_in_scan_all_button"
msgid "Scan All"
msgstr "Escanear todo"

View file

@ -11,7 +11,7 @@ import datetime
__all__ = ['Configuration', 'Move', 'ShipmentIn',
'ShipmentInReturn', 'ShipmentOut', 'ShipmentOutReturn']
'ShipmentOut', 'ShipmentOutReturn']
MIXIN_STATES = {
@ -367,23 +367,6 @@ class ShipmentIn(StockScanMixin, metaclass=PoolMeta):
return moves
class ShipmentInReturn(ShipmentIn, metaclass=PoolMeta):
__name__ = 'stock.shipment.in.return'
def get_processed_move(self):
move = super(ShipmentInReturn, self).get_processed_move()
move.from_location = self.from_location
move.to_location = self.to_location
# TODO: add to scanner or improve it
move.unit_price = move.product.cost_price
return move
@classmethod
def wait(cls, shipments):
cls.set_scanned_quantity_as_quantity(shipments, 'outgoing_moves')
super(ShipmentInReturn, cls).wait(shipments)
class ShipmentOut(StockScanMixin, metaclass=PoolMeta):
__name__ = 'stock.shipment.out'

View file

@ -69,37 +69,6 @@
<field name="group" ref="group_stock_scan_all"/>
</record>
<record model="ir.model.button" id="shipment_return_in_scan_button">
<field name="name">scan</field>
<field name="string">Scan</field>
<field name="model" search="[('model', '=', 'stock.shipment.in.return')]"/>
</record>
<record model="ir.model.button-res.group"
id="shipment_in_return_scan_button_group_stock">
<field name="button" ref="shipment_return_in_scan_button"/>
<field name="group" ref="stock.group_stock"/>
</record>
<record model="ir.model.button" id="shipment_in_return_scan_all_button">
<field name="name">scan_all</field>
<field name="string">Scan All</field>
<field name="model" search="[('model', '=', 'stock.shipment.in.return')]"/>
</record>
<record model="ir.model.button-res.group" id="shipment_in_return_scan_all_button_group_stock">
<field name="button" ref="shipment_in_return_scan_all_button"/>
<field name="group" ref="stock.group_stock"/>
</record>
<record model="ir.model.button" id="shipment_in_return_reset_scanned_quantities_button">
<field name="name">reset_scanned_quantities</field>
<field name="string">Reset Scanned Quantities</field>
<field name="model" search="[('model', '=', 'stock.shipment.in.return')]"/>
</record>
<record model="ir.model.button-res.group" id="shipment_in_reset_scanned_quantities_button_group_stock">
<field name="button" ref="shipment_in_return_reset_scanned_quantities_button"/>
<field name="group" ref="stock.group_stock"/>
</record>
<!-- stock.shipment.out -->
<record model="ir.ui.view" id="shipment_out_view_form">
<field name="model">stock.shipment.out</field>