barcode_scanner/lib/backend/schema/product/product_model.g.dart
mandreshope 6e49971883 enhance: Enhances data models and reception details
Improves JSON deserialization for product and stock picking models by
using custom `fromJson` methods and explicit `JsonKey` mappings.
This ensures robust parsing of fields like barcode, display name, and product IDs.

Adds a new `ecart` getter to calculate the difference between requested
and received quantities for stock moves.

Updates the reception details page to display a list of products
with their requested, received, and calculated difference quantities.

Removes redundant JSON-RPC fields from the `stock.picking/web_read` API call.
2025-07-30 14:16:27 +03:00

22 lines
703 B
Dart

// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'product_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_ProductModel _$ProductModelFromJson(Map<String, dynamic> json) =>
_ProductModel(
id: (json['id'] as num?)?.toInt(),
barcode: stringFromJson(json['barcode']),
displayName: stringFromJson(json['display_name']),
);
Map<String, dynamic> _$ProductModelToJson(_ProductModel instance) =>
<String, dynamic>{
'id': instance.id,
'barcode': instance.barcode,
'display_name': instance.displayName,
};