diff --git a/addons/l10n_be_intrastat/models/l10n_be_intrastat.py b/addons/l10n_be_intrastat/models/l10n_be_intrastat.py index 2506a19e2ce..f14558f14d4 100644 --- a/addons/l10n_be_intrastat/models/l10n_be_intrastat.py +++ b/addons/l10n_be_intrastat/models/l10n_be_intrastat.py @@ -22,6 +22,17 @@ class AccountInvoice(models.Model): help='Intrastat country, delivery for sales, origin for purchases', domain=[('intrastat', '=', True)]) + @api.model + def _prepare_refund(self, invoice, date_invoice=None, date=None, description=None, journal_id=None): + """ + Correctly set intrastat_country_id + @override + """ + values = super(AccountInvoice, self)._prepare_refund(invoice, date_invoice, date, description, journal_id) + if 'intrastat_country_id' not in values: + values['intrastat_country_id'] = invoice.intrastat_country_id.id + return values + class IntrastatRegion(models.Model): _name = 'l10n_be_intrastat.region' diff --git a/addons/payment_authorize/models/authorize_request.py b/addons/payment_authorize/models/authorize_request.py index 04291b5d133..a5ce5fa5bc5 100644 --- a/addons/payment_authorize/models/authorize_request.py +++ b/addons/payment_authorize/models/authorize_request.py @@ -185,7 +185,7 @@ class AuthorizeAPI(): etree.SubElement(customer, "email").text = partner.email or '' response = self._authorize_request(root) res = dict() - if not response.find('customerProfileId'): + if response.find('customerProfileId') is None: # Warning: do not use bool(etree) as the semantics is very misleading _logger.warning( 'Unable to create customer payment profile, data missing from transaction. Transaction_id: %s - Partner_id: %s' % (transaction_id, partner) diff --git a/doc/cla/individual/anhvu-sg.md b/doc/cla/individual/anhvu-sg.md new file mode 100644 index 00000000000..125880cbcd7 --- /dev/null +++ b/doc/cla/individual/anhvu-sg.md @@ -0,0 +1,11 @@ +Vietnam, 2019-07-27 + +I hereby agree to the terms of the Odoo Individual Contributor License +Agreement v1.0. + +I declare that I am authorized and able to make this agreement and sign this +declaration. + +Signed, + +Anh Vu https://github.com/anhvu-sg diff --git a/doc/cla/individual/stfnndrsn.md b/doc/cla/individual/stfnndrsn.md new file mode 100644 index 00000000000..021aec0aca8 --- /dev/null +++ b/doc/cla/individual/stfnndrsn.md @@ -0,0 +1,11 @@ +Denmark, 2019-07-24 + + I hereby agree to the terms of the Odoo Individual Contributor License +Agreement v1.0. + + I declare that I am authorized and able to make this agreement and sign this +declaration. + + Signed, + + Stefan Andersen https://github.com/stfnndrsn