[FIX] snailmail_account: Pass pricing to stamps
Up until now, we'd charge the user in actual curency but we changed the pricing to 1 creidt=1 letter. in forder to help the user we will change the name credits to stamps. As 1 letter = 1 stamp.
This commit is contained in:
@@ -4,10 +4,10 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server saas~11.5\n"
|
||||
"Project-Id-Version: Odoo Server 12.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-09-21 13:17+0000\n"
|
||||
"PO-Revision-Date: 2018-09-21 13:17+0000\n"
|
||||
"POT-Creation-Date: 2018-11-05 09:29+0000\n"
|
||||
"PO-Revision-Date: 2018-11-05 09:29+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -40,11 +40,6 @@ msgstr ""
|
||||
msgid "Config Settings"
|
||||
msgstr ""
|
||||
|
||||
#. module: snailmail_account
|
||||
#: model:ir.model.fields,field_description:snailmail_account.field_account_invoice_send__snailmail_cost
|
||||
msgid "Credits"
|
||||
msgstr ""
|
||||
|
||||
#. module: snailmail_account
|
||||
#: model:ir.model.fields,field_description:snailmail_account.field_account_invoice_send__currency_id
|
||||
msgid "Currency"
|
||||
@@ -81,3 +76,7 @@ msgstr ""
|
||||
msgid "Send by Post"
|
||||
msgstr ""
|
||||
|
||||
#. module: snailmail_account
|
||||
#: model:ir.model.fields,field_description:snailmail_account.field_account_invoice_send__snailmail_cost
|
||||
msgid "Stamp(s)"
|
||||
msgstr ""
|
||||
|
||||
@@ -11,17 +11,10 @@ class AccountInvoiceSend(models.TransientModel):
|
||||
|
||||
partner_id = fields.Many2one('res.partner', compute='_get_partner', string='Partner')
|
||||
snailmail_is_letter = fields.Boolean('Send by Post', help='Allows to send the document by snail mail (coventional posting delivery service)', default=lambda self: self.env.user.company_id.invoice_is_snailmail)
|
||||
snailmail_cost = fields.Float(string='Credits', compute='_snailmail_estimate', store=True, readonly=True)
|
||||
snailmail_cost = fields.Float(string='Stamp(s)', compute='_snailmail_estimate', store=True, readonly=True)
|
||||
currency_id = fields.Many2one('res.currency', compute='_get_invoice_currency', string="Currency")
|
||||
letter_ids = fields.Many2many('snailmail.letter', 'snailmail_letter_account_invoice_send_rel', ondelete='cascade')
|
||||
|
||||
@api.multi
|
||||
@api.onchange('invoice_ids')
|
||||
def _get_invoice_currency(self):
|
||||
for wizard in self:
|
||||
if wizard.invoice_ids:
|
||||
wizard.currency_id = wizard.invoice_ids.mapped('currency_id')[0].id
|
||||
|
||||
@api.multi
|
||||
@api.onchange('invoice_ids')
|
||||
def _get_partner(self):
|
||||
|
||||
@@ -9,14 +9,16 @@
|
||||
<xpath expr="//div[@name='option_email']" position='before'>
|
||||
<div name="option_letter">
|
||||
<field name="letter_ids" invisible="1"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<div name="option" class="text-left d-inline-block">
|
||||
<field name="snailmail_is_letter" />
|
||||
<b><label for="snailmail_is_letter"/></b>
|
||||
</div>
|
||||
<div class="text-left d-inline-block mr8" name='cost' attrs="{'invisible': [('snailmail_is_letter','=', False)]}">
|
||||
<b>(
|
||||
<field name="snailmail_cost" class="mr4" widget='monetary' options="{'currency_field': 'currency_id'}"/>
|
||||
<span>
|
||||
<field name="snailmail_cost" options="{'digits':[0,0]}" class="mr4"/>
|
||||
<label for="snailmail_cost" class="mr4"/>
|
||||
</span>
|
||||
<i class="fa fa-info-circle" role="img" aria-label="Warning" title="
|
||||
The letter will be sent using the IAP service from Odoo. Make sure you have enough credits on your account or proceed to a recharge. The price is estimated based on 1 page per document.
|
||||
"/>
|
||||
|
||||
Reference in New Issue
Block a user