diff --git a/sf_machine_connect/static/src/js/barcode_button.js b/sf_machine_connect/static/src/js/barcode_button.js
index 8bd48d65..c6554598 100644
--- a/sf_machine_connect/static/src/js/barcode_button.js
+++ b/sf_machine_connect/static/src/js/barcode_button.js
@@ -98,9 +98,8 @@ export class CodeField extends Component {
}]);
console.log(updatetrayRecord)
});
- this.props.update(records[0].code, records[0].tray_id);
- location.replace(location.href)
- // location.reload()
+ this.props.update(records[0].code);
+ $('.o_form_button_save').click();
} else {
if (records[0].state === '占用') {
console.log('此托盘已占用,请检查')
diff --git a/sf_machine_connect/static/src/xml/barcode_button.xml b/sf_machine_connect/static/src/xml/barcode_button.xml
index 215f4cd0..d380e222 100644
--- a/sf_machine_connect/static/src/xml/barcode_button.xml
+++ b/sf_machine_connect/static/src/xml/barcode_button.xml
@@ -12,7 +12,6 @@
aria-label="Scan barcode"
title="Scan barcode"
data-tooltip="Scan barcode"
- style="position: absolute !important;"
/>
diff --git a/sf_machine_connect/views/compensation.xml b/sf_machine_connect/views/compensation.xml
index 4804df61..a6f47b23 100644
--- a/sf_machine_connect/views/compensation.xml
+++ b/sf_machine_connect/views/compensation.xml
@@ -19,8 +19,6 @@
class="btn-primary" attrs='{"invisible": ["|",
("state","!=","progress"),("user_permissions","=",False)]}'/>
-
-