-
-
Notifications
You must be signed in to change notification settings - Fork 621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[17.0] [ADD] pos_order_attachment #1137
base: 17.0
Are you sure you want to change the base?
Conversation
4f2e30c
to
be034fc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Partial test. Some remarks inline.
also I added an attahcment in the Pos, and the quantity of attachment is not updated.
(note : I didn't saw that the PR was in draft, so sorry for the noice, if it's WIP).
pos_attachment/static/src/app/screens/product_screen/attachments_button.esm.js
Outdated
Show resolved
Hide resolved
async click() { | ||
const order = this.pos.get_order(); | ||
order.save_to_db(); | ||
this.env.services.ui.block(); | ||
const syncOrderResult = await this.pos.push_single_order(order); | ||
this.env.services.ui.unblock(); | ||
if (syncOrderResult instanceof ConnectionLostError) { | ||
return; | ||
} else if (!syncOrderResult) { | ||
return; | ||
} | ||
await this.popup.add(AttachmentPopup, {order: order}); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you save / push your order before displaying the popup.
weird step to reproduce :
- create an order product 100€.
- go to payment screen set a payment of 100€.
- go back to the previous scren and click on attachments.
Go to the backoffice :
-> the order is marked as paid. (even if the user didn't click on "validate payment".)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because I want to avoid to store the attachments inside the Database. It is certainly an issue, maybe it has more sense to add this at already validated orders. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, I think attachment should be saved, when orders are paid (/invoiced), indeed (or saved in draft) Otherwise, you'll have side effect, like this one I think.
be034fc
to
baf8ab3
Compare
I think it's better to rename to pos_order_attachment (in case we have other modules in pos with attachments... ie pos_customer_attachment...) |
Renamed to pos_order_attachment @cvinh Attachments can be added only on validated orders |
4813eae
to
21ed459
Compare
21ed459
to
8e1876a
Compare
pos_order_attachment/static/src/app/screens/receipt_screen/receipt_screen.xml
Outdated
Show resolved
Hide resolved
pos_order_attachment/static/src/app/screens/receipt_screen/receipt_screen.xml
Show resolved
Hide resolved
7990ab8
to
3cca2e4
Compare
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
@etobella can you reopen, please. |
This addon allows to manage Attachments from Orders on POS Frontend
Known bugs:
@cvinh