Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c98fefe347
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| limit=1, | ||
| ) | ||
| for p in pos_order.payment_ids: | ||
| payment_uuid = p.uuid |
There was a problem hiding this comment.
Stop reading missing
uuid on backend payment records
create_from_ui now dereferences p.uuid for every pos.payment line, but pos.payment has no uuid field in this codebase (see addons/point_of_sale/models/pos_payment.py and _payment_fields in pos_order.py, which never stores one). This raises AttributeError during order synchronization, so POS orders cannot be finalized/synced once this path runs.
Useful? React with 👍 / 👎.
Motivation
Description
glory.transaction:state,pos_payment_uuid,attempt_count,last_error, andprocessed_at, and enforced uniqueness ofpos_payment_uuidvia an SQL constraint.generate_glory_transactionto acceptpos_payment_uuid, to deduplicate/update existing transactions when the UUID is present, incrementattempt_countand setstate/last_errorappropriately, and to recordprocessed_aton creation/update.pos.order.create_from_uito build a map of incoming order payloads, extractglory_payment_uuidfromstatement_ids, and link existingglory.transactionrecords to newly createdpos.orderrecords by UUID when available.action_set_glory_on_orderto attempt linking transactions by payment UUID before falling back to matching by amount/session/operation, and simplified imports (AccessError).models.jsnow attachesglory_payment_uuidto paymentlines and preserves it in JSON import/export, andGloryPaymentScreen.jsinitializesglory_payment_uuid, populates it when missing, and forwards it in all RPC calls totry_write_glory_transaction.try_write_glory_transactionto acceptpos_payment_uuid, and adapted call sites accordingly.glory_transaction_view.xmlto displaystateandpos_payment_uuidin forms/trees, added search filters forstate, and fixed a view field naming inconsistency.Testing
Codex Task