Skip to content

Commit

Permalink
[FIX] pos_partner_birthdate: update & save partner birthdate from PoS…
Browse files Browse the repository at this point in the history
… Interface.
  • Loading branch information
suker committed Aug 2, 2023
1 parent 986a093 commit a1fb702
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pos_partner_birthdate/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"depends": ["point_of_sale", "partner_contact_birthdate"],
"assets": {
"point_of_sale.assets": [
"pos_partner_birthdate/static/src/xml/ClientDetailsEdit.xml"
"pos_partner_birthdate/static/src/xml/ClientDetailsEdit.xml",
"pos_partner_birthdate/static/src/js/ClientDetailsEdit.esm.js",
]
},
}
1 change: 1 addition & 0 deletions pos_partner_birthdate/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
* Emanuel Cino <ecino@compassion.ch>
* Juan Carlos Bonilla Bravo <juancarlos.bonilla@factorlibre.com>
16 changes: 16 additions & 0 deletions pos_partner_birthdate/static/src/js/ClientDetailsEdit.esm.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/** @odoo-module **/
import PartnerDetailsEdit from "point_of_sale.PartnerDetailsEdit";
import Registries from "point_of_sale.Registries";

const PartnerDetailsEditBirthdate = (OriginalPartnerDetailsEdit) =>
class extends OriginalPartnerDetailsEdit {
setup() {
super.setup();
this.changes = {
...this.changes,
birthdate_date: this.props.partner.birthdate_date || "",
};
}
};

Registries.Component.extend(PartnerDetailsEdit, PartnerDetailsEditBirthdate);
1 change: 1 addition & 0 deletions pos_partner_birthdate/static/src/xml/ClientDetailsEdit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
class="detail"
name="birthdate_date"
type="date"
t-model="changes.birthdate_date"
t-on-change="captureChange"
t-att-value="props.partner.birthdate_date || ''"
placeholder="Birthdate"
Expand Down

0 comments on commit a1fb702

Please sign in to comment.