Skip to content

Commit

Permalink
[FIX] l10n_br_pos_cfe: Change sat card var name
Browse files Browse the repository at this point in the history
Change the card acquirer variable name.
  • Loading branch information
ygcarvalh committed Feb 28, 2023
1 parent c14df4f commit 00bb34b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion l10n_br_pos_cfe/models/pos_payment_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ class PosPaymentMethod(models.Model):
_inherit = "pos.payment.method"

sat_payment_mode = fields.Selection(WA03_CMP_MP, "SAT Payment Mode")
sat_card_accrediting = fields.Selection(CARD_ACQUIRERS, "Card Acquirer")
sat_card_acquirer = fields.Selection(CARD_ACQUIRERS, "Card Acquirer")
7 changes: 2 additions & 5 deletions l10n_br_pos_cfe/static/src/js/models.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@ odoo.define("l10n_br_pos_cfe.models", function (require) {
"cnpj_software_house",
"sign_software_house",
]);
models.load_fields("pos.payment.method", [
"sat_payment_mode",
"sat_card_accrediting",
]);
models.load_fields("pos.payment.method", ["sat_payment_mode", "sat_card_acquirer"]);

var _super_order = models.Order.prototype;
models.Order = models.Order.extend({
Expand Down Expand Up @@ -213,7 +210,7 @@ odoo.define("l10n_br_pos_cfe.models", function (require) {
_prepare_fiscal_json: function (json) {
_super_payment_line._prepare_fiscal_json.apply(this, arguments);
json.sat_payment_mode = this.payment_method.sat_payment_mode;
json.sat_card_accrediting = this.payment_method.sat_card_accrediting;
json.sat_card_acquirer = this.payment_method.sat_card_acquirer;
},
export_for_printing: function () {
var json = _super_payment_line.export_for_printing.apply(this, arguments);
Expand Down
2 changes: 1 addition & 1 deletion l10n_br_pos_cfe/views/pos_payment_method_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<group name="l10n_br_pos" position="inside">
<group>
<field name="sat_payment_mode" />
<field name="sat_card_accrediting" />
<field name="sat_card_acquirer" />
</group>
</group>
</field>
Expand Down

0 comments on commit 00bb34b

Please sign in to comment.