Browse Source

[REF] rename field

pull/440/head
Sylvain LE GAL 5 years ago
parent
commit
b72f5221a8
  1. 8
      pos_payment_terminal/i18n/es.po
  2. 8
      pos_payment_terminal/i18n/fr.po
  3. 8
      pos_payment_terminal/i18n/hr_HR.po
  4. 8
      pos_payment_terminal/i18n/it.po
  5. 8
      pos_payment_terminal/i18n/nl_NL.po
  6. 4
      pos_payment_terminal/i18n/pos_payment_terminal.pot
  7. 5
      pos_payment_terminal/models/account_journal.py
  8. 2
      pos_payment_terminal/models/pos_order.py
  9. 2
      pos_payment_terminal/static/src/js/devices.js
  10. 2
      pos_payment_terminal/static/src/js/models.js
  11. 2
      pos_payment_terminal/views/account_journal.xml

8
pos_payment_terminal/i18n/es.po

@ -20,12 +20,12 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: pos_payment_terminal
#: selection:account.journal,payment_mode:0
#: selection:account.journal,pos_terminal_payment_mode:0
msgid "Card"
msgstr "Tarjeta"
#. module: pos_payment_terminal
#: selection:account.journal,payment_mode:0
#: selection:account.journal,pos_terminal_payment_mode:0
msgid "Check"
msgstr "Talón"
@ -35,7 +35,7 @@ msgid "Journal"
msgstr "Diario"
#. module: pos_payment_terminal
#: model:ir.model.fields,field_description:pos_payment_terminal.field_account_journal_payment_mode
#: model:ir.model.fields,field_description:pos_payment_terminal.field_account_journal__pos_terminal_payment_mode
msgid "Payment Mode"
msgstr "Forma de pago"
@ -45,7 +45,7 @@ msgid "Point of Sale Orders"
msgstr ""
#. module: pos_payment_terminal
#: model:ir.model.fields,help:pos_payment_terminal.field_account_journal_payment_mode
#: model:ir.model.fields,help:pos_payment_terminal.field_account_journal__pos_terminal_payment_mode
msgid "Select the payment mode sent to the payment terminal"
msgstr "Seleccione la forma de pega enviada al terminal de pago"

8
pos_payment_terminal/i18n/fr.po

@ -21,12 +21,12 @@ msgid "A payment terminal is available on the Proxy"
msgstr "Un terminal de paiment est disponible sur le proxy"
#. module: pos_payment_terminal
#: selection:account.journal,payment_mode:0
#: selection:account.journal,pos_terminal_payment_mode:0
msgid "Card"
msgstr "Carte"
#. module: pos_payment_terminal
#: selection:account.journal,payment_mode:0
#: selection:account.journal,pos_terminal_payment_mode:0
msgid "Check"
msgstr "Chèque"
@ -36,7 +36,7 @@ msgid "Journal"
msgstr "Journal"
#. module: pos_payment_terminal
#: model:ir.model.fields,field_description:pos_payment_terminal.field_account_journal__payment_mode
#: model:ir.model.fields,field_description:pos_payment_terminal.field_account_journal__pos_terminal_payment_mode
msgid "Payment Mode"
msgstr "Moyen de paiement"
@ -57,7 +57,7 @@ msgid "Point of Sale Orders"
msgstr "Commandes du point de vente"
#. module: pos_payment_terminal
#: model:ir.model.fields,help:pos_payment_terminal.field_account_journal__payment_mode
#: model:ir.model.fields,help:pos_payment_terminal.field_account_journal__pos_terminal_payment_mode
msgid "Select the payment mode sent to the payment terminal"
msgstr "Sélectionner le mode de paiement envoyé au terminal de paiement"

8
pos_payment_terminal/i18n/hr_HR.po

@ -21,12 +21,12 @@ msgstr ""
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
#. module: pos_payment_terminal
#: selection:account.journal,payment_mode:0
#: selection:account.journal,pos_terminal_payment_mode:0
msgid "Card"
msgstr "Kartica"
#. module: pos_payment_terminal
#: selection:account.journal,payment_mode:0
#: selection:account.journal,pos_terminal_payment_mode:0
msgid "Check"
msgstr "Ček"
@ -36,7 +36,7 @@ msgid "Journal"
msgstr "Dnevnik"
#. module: pos_payment_terminal
#: model:ir.model.fields,field_description:pos_payment_terminal.field_account_journal_payment_mode
#: model:ir.model.fields,field_description:pos_payment_terminal.field_account_journal__pos_terminal_payment_mode
msgid "Payment Mode"
msgstr "Način plaćanja"
@ -46,7 +46,7 @@ msgid "Point of Sale Orders"
msgstr ""
#. module: pos_payment_terminal
#: model:ir.model.fields,help:pos_payment_terminal.field_account_journal_payment_mode
#: model:ir.model.fields,help:pos_payment_terminal.field_account_journal__pos_terminal_payment_mode
msgid "Select the payment mode sent to the payment terminal"
msgstr "Odaberite način plaćanja korišten na naplatnom terminalu"

8
pos_payment_terminal/i18n/it.po

@ -19,12 +19,12 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: pos_payment_terminal
#: selection:account.journal,payment_mode:0
#: selection:account.journal,pos_terminal_payment_mode:0
msgid "Card"
msgstr ""
#. module: pos_payment_terminal
#: selection:account.journal,payment_mode:0
#: selection:account.journal,pos_terminal_payment_mode:0
msgid "Check"
msgstr ""
@ -34,7 +34,7 @@ msgid "Journal"
msgstr ""
#. module: pos_payment_terminal
#: model:ir.model.fields,field_description:pos_payment_terminal.field_account_journal_payment_mode
#: model:ir.model.fields,field_description:pos_payment_terminal.field_account_journal__pos_terminal_payment_mode
msgid "Payment Mode"
msgstr ""
@ -44,7 +44,7 @@ msgid "Point of Sale Orders"
msgstr ""
#. module: pos_payment_terminal
#: model:ir.model.fields,help:pos_payment_terminal.field_account_journal_payment_mode
#: model:ir.model.fields,help:pos_payment_terminal.field_account_journal__pos_terminal_payment_mode
msgid "Select the payment mode sent to the payment terminal"
msgstr ""

8
pos_payment_terminal/i18n/nl_NL.po

@ -20,12 +20,12 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: pos_payment_terminal
#: selection:account.journal,payment_mode:0
#: selection:account.journal,pos_terminal_payment_mode:0
msgid "Card"
msgstr ""
#. module: pos_payment_terminal
#: selection:account.journal,payment_mode:0
#: selection:account.journal,pos_terminal_payment_mode:0
msgid "Check"
msgstr ""
@ -35,7 +35,7 @@ msgid "Journal"
msgstr ""
#. module: pos_payment_terminal
#: model:ir.model.fields,field_description:pos_payment_terminal.field_account_journal_payment_mode
#: model:ir.model.fields,field_description:pos_payment_terminal.field_account_journal__pos_terminal_payment_mode
msgid "Payment Mode"
msgstr ""
@ -45,7 +45,7 @@ msgid "Point of Sale Orders"
msgstr ""
#. module: pos_payment_terminal
#: model:ir.model.fields,help:pos_payment_terminal.field_account_journal_payment_mode
#: model:ir.model.fields,help:pos_payment_terminal.field_account_journal__pos_terminal_payment_mode
msgid "Select the payment mode sent to the payment terminal"
msgstr ""

4
pos_payment_terminal/i18n/pos_payment_terminal.pot

@ -21,12 +21,12 @@ msgid "A payment terminal is available on the Proxy"
msgstr ""
#. module: pos_payment_terminal
#: selection:account.journal,payment_mode:0
#: selection:account.journal,pos_terminal_payment_mode:0
msgid "Card"
msgstr ""
#. module: pos_payment_terminal
#: selection:account.journal,payment_mode:0
#: selection:account.journal,pos_terminal_payment_mode:0
msgid "Check"
msgstr ""

5
pos_payment_terminal/models/account_journal.py

@ -8,6 +8,7 @@ from odoo import models, fields
class AccountJournal(models.Model):
_inherit = 'account.journal'
payment_mode = fields.Selection(
[('card', 'Card'), ('check', 'Check')], 'Payment Mode',
pos_terminal_payment_mode = fields.Selection(
selection=[('card', 'Card'), ('check', 'Check')],
string='Terminal Payment Mode',
help="Select the payment mode sent to the payment terminal")

2
pos_payment_terminal/models/pos_order.py

@ -21,7 +21,7 @@ class PosOrder(models.Model):
currency_digits = pos_session.currency_id.decimal_places
card_journals = self.env['account.journal'].search([
('id', 'in', [p[2]['journal_id'] for p in payments]),
('payment_mode', '!=', False),
('pos_terminal_payment_mode', '!=', False),
])
card_payments = [record[2] for record in payments
if record[2]['journal_id'] in card_journals.ids]

2
pos_payment_terminal/static/src/js/devices.js

@ -60,7 +60,7 @@ odoo.define('pos_payment_terminal.devices', function (require) {
var data = {'amount' : line.get_amount(),
'currency_iso' : currency_iso,
'currency_decimals' : currency_decimals,
'payment_mode' : line.cashregister.journal.payment_mode,
'payment_mode' : line.cashregister.journal.pos_terminal_payment_mode,
'order_id': order.uid};
this.message('payment_terminal_transaction_start', {'payment_info' : JSON.stringify(data)});
},

2
pos_payment_terminal/static/src/js/models.js

@ -13,7 +13,7 @@ odoo.define('pos_payment_terminal.models', function (require) {
var models = require('point_of_sale.models');
var _orderproto = models.Order.prototype;
models.load_fields('account.journal', ['payment_mode']);
models.load_fields('account.journal', ['pos_terminal_payment_mode']);
models.Order = models.Order.extend({
initialize: function(){

2
pos_payment_terminal/views/account_journal.xml

@ -7,7 +7,7 @@
<field name="arch" type="xml">
<group name="amount_authorized" position="after">
<group name="payment_mode_group" attrs="{'invisible': [('type', '!=', 'bank')]}">
<field name="payment_mode"/>
<field name="pos_terminal_payment_mode"/>
</group>
</group>
</field>

Loading…
Cancel
Save