[19.0][ADD] partner_identification_kyc#2230
Conversation
f531cbc to
f17c6ff
Compare
d79d992 to
966deb9
Compare
966deb9 to
2ab9aae
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. |
Add a module providing Know Your Customer (KYC) identification for partners, built on top of partner_identification: - a dedicated "KYC" identification category with its check activity type - a "Request KYC" button on the partner form and a helper to ensure a KYC record exists (e.g. for API-created partners) - computed KYC validity / button-visibility, optionally enabled on child contacts - a KYC filter on the id_numbers views and demo data
ffd19be to
1f0cea6
Compare
BhaveshHeliconia
left a comment
There was a problem hiding this comment.
enable_on_child_contacts field is currently only being used with KYC category, so we may use one boolean field to distinguish KYC category from others and also restore invisible="code!='KYC'" with corrected condition expression.
ID Number field is not setting with automatically generated sequence while trying to create KYC ID records manually using one2many field.
- Add an is_kyc boolean on res.partner.id_category to mark the KYC category instead of hard-coding the 'KYC' code; enable_on_child_contacts is now only shown for KYC categories (invisible="not is_kyc"), and the search filter matches on is_kyc. - Auto-assign the identification number from the kyc.identification sequence in res.partner.id_number.create, so KYC records created manually via the one2many no longer require a hand-typed ID Number (name is relaxed for KYC in the form view). - Drop the duplicated 'KYC-' prefix from the generated ID Number (the category already conveys KYC). - Tests: cover manual auto-sequence and provided-name paths.
|
@BhaveshHeliconia thanks for the thorough review! Addressed in a26692c. Point by point: Design points
Already fixed in the latest push (the review predates a force-push, so these showed as outdated):
Added tests for the manual auto-sequence and the provided-name paths. Could you re-review when you have a moment? 🙏 |
test_action_request_kyc_with_custom_sequence still asserted the old "KYC-" prefixed ID Number; the number now comes purely from the sequence. Assert the name is set and no longer duplicates the category.
BhaveshHeliconia
left a comment
There was a problem hiding this comment.
- Keep prefix back in
seq_kyc_identificationor modifycreatemethod logic. ID Numberfield is required in form view, so unable to save form without it.
…Number Addresses the second review round: - Configure the "KYC" prefix on seq_kyc_identification (instead of hard-coding it in create), so generated ID Numbers read e.g. KYC001. - Prefill the (required) ID Number from the sequence via an onchange when the KYC category is selected, so a KYC record can be created manually through the one2many without typing the number. create() keeps assigning it for the Request KYC button and programmatic creation. - Drop the now-unnecessary form-view required modifier and the unused category_is_kyc related field. - Tests: assert the KYC prefix and add an onchange/Form test.
|
@BhaveshHeliconia thanks for testing! Both points addressed in 349dcd1:
Added a |
common.Form construction errored in the Odoo 19 CI; call the onchange method on a new() record instead, which tests the same prefill behaviour.
Add module to use the partner_identification number model for KYC processes.
#2218
#2224
#2225