Skip to content

Commit

Permalink
[IMP] *: fix typos in comments
Browse files Browse the repository at this point in the history
closes odoo#35404

Signed-off-by: Martin Trigaux (mat) <[email protected]>
  • Loading branch information
MiquelRForgeFlow authored and mart-e committed Aug 7, 2019
1 parent 1069890 commit 355a5df
Show file tree
Hide file tree
Showing 76 changed files with 97 additions and 97 deletions.
6 changes: 3 additions & 3 deletions addons/account/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -2981,7 +2981,7 @@ def check_full_reconcile(self):
else:
amls = self.browse(list(amls))

# If we have multiple currency, we can only base ourselve on debit-credit to see if it is fully reconciled
# If we have multiple currency, we can only base ourselves on debit-credit to see if it is fully reconciled
currency = set([a.currency_id for a in amls if a.currency_id.id != False])
multiple_currency = False
if len(currency) != 1:
Expand Down Expand Up @@ -3014,7 +3014,7 @@ def check_full_reconcile(self):
to_balance[aml.currency_id][1] += aml.amount_residual != 0 and aml.amount_residual or aml.amount_residual_currency

# Check if reconciliation is total
# To check if reconciliation is total we have 3 differents use case:
# To check if reconciliation is total we have 3 different use case:
# 1) There are multiple currency different than company currency, in that case we check using debit-credit
# 2) We only have one currency which is different than company currency, in that case we check using amount_currency
# 3) We have only one currency and some entries that don't have a secundary currency, in that case we check debit-credit
Expand Down Expand Up @@ -3198,7 +3198,7 @@ def _create_writeoff(self, writeoff_vals):
""" Create a writeoff move per journal for the account.move.lines in self. If debit/credit is not specified in vals,
the writeoff amount will be computed as the sum of amount_residual of the given recordset.
:param writeoff_vals: list of dicts containing values suitable for account_move_line.create(). The data in vals will
be processed to create bot writeoff acount.move.line and their enclosing account.move.
be processed to create bot writeoff account.move.line and their enclosing account.move.
"""
def compute_writeoff_counterpart_vals(values):
line_values = values.copy()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ var StatementModel = BasicModel.extend({
var props = _.filter(line.reconciliation_proposition, function (prop) {return !prop.invalid;});
var computeLinePromise;
if (props.length === 0) {
// Usability: if user has not choosen any lines and click validate, it has the same behavior
// Usability: if user has not chosen any lines and click validate, it has the same behavior
// as creating a write-off of the same amount.
props.push(self._formatQuickCreate(line, {
account_id: [line.st_line.open_balance_account_id, self.accounts[line.st_line.open_balance_account_id]],
Expand Down
2 changes: 1 addition & 1 deletion addons/account_test/views/accounting_assert_test_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<group string="Code Help">
<pre>
Code should always set a variable named `result` with the result of your test, that can be a list or
a dictionary. If `result` is an empty list, it means that the test was succesful. Otherwise it will
a dictionary. If `result` is an empty list, it means that the test was successful. Otherwise it will
try to translate and print what is inside `result`.

If the result of your test is a dictionary, you can set a variable named `column_order` to choose in
Expand Down
2 changes: 1 addition & 1 deletion addons/calendar/models/calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ class Meeting(models.Model):

@api.model
def default_get(self, fields):
# super default_model='crm.lead' for easier use in adddons
# super default_model='crm.lead' for easier use in addons
if self.env.context.get('default_res_model') and not self.env.context.get('default_res_model_id'):
self = self.with_context(
default_res_model_id=self.env['ir.model'].sudo().search([
Expand Down
4 changes: 2 additions & 2 deletions addons/calendar_sms/models/calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class CalendarEvent(models.Model):
_inherit = 'calendar.event'

def _sms_get_default_partners(self):
""" Method overriden from mail.thread (defined in the sms module).
""" Method overridden from mail.thread (defined in the sms module).
SMS text messages will be sent to attendees that haven't declined the event(s).
"""
return self.mapped('attendee_ids').filtered(lambda att: att.state != 'declined').mapped('partner_id')
Expand All @@ -39,7 +39,7 @@ class AlarmManager(models.AbstractModel):

@api.model
def get_next_mail(self):
""" Cron method, overriden here to send SMS reminders as well
""" Cron method, overridden here to send SMS reminders as well
"""
result = super(AlarmManager, self).get_next_mail()
now = fields.Datetime.to_string(fields.Datetime.now())
Expand Down
2 changes: 1 addition & 1 deletion addons/crm/tests/test_crm_pls.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def _get_lead_values(self, team_id, name_suffix, country_id, state_id, email_sta

def test_predictive_lead_scoring(self):
""" We test here computation of lead probability based on PLS Bayes.
We will use 3 differents values for each possible variables:
We will use 3 different values for each possible variables:
country_id : 1,2,3
state_id: 1,2,3
email_state: correct, incorrect, None
Expand Down
4 changes: 2 additions & 2 deletions addons/hr/models/hr_employee.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def _default_image(self):
'res.partner', 'Address', help='Enter here the private address of the employee, not the one linked to your company.',
groups="hr.group_hr_user", tracking=True)
is_address_home_a_company = fields.Boolean(
'The employee adress has a company linked',
'The employee address has a company linked',
compute='_compute_is_address_home_a_company',
)
private_email = fields.Char(related='address_home_id.email', string="Private Email", readonly=False, groups="hr.group_hr_user")
Expand Down Expand Up @@ -293,7 +293,7 @@ def generate_random_barcode(self):

@api.depends('address_home_id.parent_id')
def _compute_is_address_home_a_company(self):
"""Checks that choosen address (res.partner) is not linked to a company.
"""Checks that chosen address (res.partner) is not linked to a company.
"""
for employee in self:
try:
Expand Down
2 changes: 1 addition & 1 deletion addons/mail/models/mail_thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -2749,7 +2749,7 @@ def _get_mail_redirect_suggested_company(self):
company issues when clicking on a link sent by email, this
could be called to try setting the most suited company on
the allowed_company_ids in the context. This method can be
overriden, for example on the hr.leave model, where the
overridden, for example on the hr.leave model, where the
most suited company is the company of the leave type, as
specified by the ir.rule.
"""
Expand Down
2 changes: 1 addition & 1 deletion addons/mail/static/scripts/odoo-mailgate.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#
# *: |/home/odoo/src/odoo-mail.py
#
# Note python2 was choosen on purpose for backward compatibility with old mail
# Note python2 was chosen on purpose for backward compatibility with old mail
# servers.
#
import optparse
Expand Down
6 changes: 3 additions & 3 deletions addons/mail/static/src/js/models/threads/thread.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var Thread = AbstractThread.extend(ServicesMixin, {
//--------------------------------------------------------------------------

/**
* Updates the _detached state of the thread. Must be overriden to reflect
* Updates the _detached state of the thread. Must be overridden to reflect
* the new state in the interface.
*/
close: function () {
Expand All @@ -50,7 +50,7 @@ var Thread = AbstractThread.extend(ServicesMixin, {
this._warnUpdatedWindowState();
},
/**
* Updates the _detached state of the thread. Must be overriden to reflect
* Updates the _detached state of the thread. Must be overridden to reflect
* the new state in the interface.
*
* @param {Object} [options={}]
Expand Down Expand Up @@ -86,7 +86,7 @@ var Thread = AbstractThread.extend(ServicesMixin, {
return Promise.resolve([]);
},
/**
* Updates the folded state of the thread. Must be overriden to reflect
* Updates the folded state of the thread. Must be overridden to reflect
* the new state in the interface.
*
* @override
Expand Down
2 changes: 1 addition & 1 deletion addons/mrp/models/mrp_production.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ def _plan_workorders(self):
duration = best_workcenter.time_start + cycle_number * workorder.operation_id.time_cycle * 100.0 / best_workcenter.time_efficiency
start_date = best_workcenter.resource_calendar_id.plan_hours(duration / 60.0, best_start_date, compute_leaves=True, resource=best_workcenter.resource_id, domain=[('time_type', 'in', ['leave', 'other'])])

# Create leave on choosen workcenter calendar
# Create leave on chosen workcenter calendar
leave = self.env['resource.calendar.leaves'].create({
'name': self.name + ' - ' + workorder.name,
'calendar_id': best_workcenter.resource_calendar_id.id,
Expand Down
2 changes: 1 addition & 1 deletion addons/mrp/tests/test_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ def test_product_produce_6(self):
produce_wizard.do_produce()

def test_product_produce_7(self):
""" Add components in 2 differents sub location. Do not reserve the MO
""" Add components in 2 different sub location. Do not reserve the MO
and checks that the move line created takes stock from location that
contains needed raw materials.
"""
Expand Down
4 changes: 2 additions & 2 deletions addons/pad/static/tests/pad_tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ QUnit.module('pad widget', {
"should have no confirmation modal opened");
await testUtils.nextTick();
assert.strictEqual(defState, 'resolved',
"can be discarded was succesfully resolved");
"can be discarded was successfully resolved");
form.destroy();
delete FieldPad.prototype.isPadConfigured;
});
Expand Down Expand Up @@ -234,7 +234,7 @@ QUnit.module('pad widget', {
"should have no confirmation modal opened");
await testUtils.nextTick();
assert.strictEqual(defState, 'resolved',
"can be discarded was succesfully resolved");
"can be discarded was successfully resolved");
form.destroy();
delete FieldPad.prototype.isPadConfigured;
});
Expand Down
2 changes: 1 addition & 1 deletion addons/payment/models/payment_acquirer.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ def s2s_process(self, data):
if not self.s2s_validate(data):
return False
if hasattr(self, cust_method_name):
# As this method may be called in JSON and overriden in various addons
# As this method may be called in JSON and overridden in various addons
# let us raise interesting errors before having stranges crashes
if not data.get('partner_id'):
raise ValueError(_('Missing partner reference when trying to create a new payment token'))
Expand Down
4 changes: 2 additions & 2 deletions addons/point_of_sale/static/tests/tours/point_of_sale.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ odoo.define('point_of_sale.tour.pricelist', function (require) {
trigger: ".selection-item:contains('Public Pricelist')",
}, {
content: "verify that the boni shelf have been recomputed and the\
shelf have not (their price was manually overriden)",
shelf have not (their price was manually overridden)",
trigger: ".total > .value:contains('$ 8.96')",
}, {
content: "click pricelist button",
Expand Down Expand Up @@ -297,7 +297,7 @@ odoo.define('point_of_sale.tour.acceptance', function (require) {
trigger: ".js_connecting:visible",
run: function () {}, // it's a check
}, {
content: "verify that the order has been succesfully sent to the backend",
content: "verify that the order has been successfully sent to the backend",
trigger: ".js_connected:visible",
run: function () {}, // it's a check
}, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ http {
listen 80 default_server;

location / {
# Every OS request specific adress and .txt file to test if hotspot are connected to internet however login splash page don't display
# Every OS request specific address and .txt file to test if hotspot are connected to internet however login splash page don't display
# this line respond true for every request and send a login splash page to client
# it work for every OS
return 301 $scheme://10.11.12.1:8069;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ server {
#server_name _;

location / {
# Every OS request specific adress and .txt file to test if hotspot are connected to internet however login splash page don't display
# Every OS request specific address and .txt file to test if hotspot are connected to internet however login splash page don't display
# this line respond true for every request and send a login splash page to client
# it work for every OS
return 301 $scheme://10.11.12.1:8069;
Expand Down
2 changes: 1 addition & 1 deletion addons/point_of_sale/views/point_of_sale.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<link rel="stylesheet" href="/point_of_sale/static/src/css/pos.css" id="pos-stylesheet"/>
<link rel="stylesheet" href="/point_of_sale/static/src/css/keyboard.css"/>

<link rel="stylesheet" type="text/less" href="/web/static/src/scss/fontawesome_overriden.scss"/>
<link rel="stylesheet" type="text/less" href="/web/static/src/scss/fontawesome_overridden.scss"/>

<script type="text/javascript" src="/point_of_sale/static/lib/backbone/backbone.js"></script>
<script type="text/javascript" src="/point_of_sale/static/lib/waitfont.js"></script>
Expand Down
4 changes: 2 additions & 2 deletions addons/sale/models/sale.py
Original file line number Diff line number Diff line change
Expand Up @@ -1197,7 +1197,7 @@ def _compute_qty_delivered_method(self):
def _compute_qty_delivered(self):
""" This method compute the delivered quantity of the SO lines: it covers the case provide by sale module, aka
expense/vendor bills (sum of unit_amount of AAL), and manual case.
This method should be overriden to provide other way to automatically compute delivered qty. Overrides should
This method should be overridden to provide other way to automatically compute delivered qty. Overrides should
take their concerned so lines, compute and set the `qty_delivered` field, and call super with the remaining
records.
"""
Expand All @@ -1222,7 +1222,7 @@ def _get_delivered_quantity_by_analytic(self, additional_domain):
if not self:
return result

# group anaytic lines by product uom and so line
# group analytic lines by product uom and so line
domain = expression.AND([[('so_line', 'in', self.ids)], additional_domain])
data = self.env['account.analytic.line'].read_group(
domain,
Expand Down
2 changes: 1 addition & 1 deletion addons/sale_purchase/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def action_view_purchase(self):

def _activity_cancel_on_purchase(self):
""" If some SO are cancelled, we need to put an activity on their generated purchase. If sale lines of
differents sale orders impact different purchase, we only want one activity to be attached.
different sale orders impact different purchase, we only want one activity to be attached.
"""
purchase_to_notify_map = {} # map PO -> recordset of SOL as {purchase.order: set(sale.orde.liner)}

Expand Down
2 changes: 1 addition & 1 deletion addons/sale_stock/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def _onchange_product_id_check_availability(self):
return self._check_availability(self.product_id)

def _check_availability(self, product_id):
""" The purpose of this method is only to be overriden if
""" The purpose of this method is only to be overridden if
'product_id' is a kit
"""
product_qty = self.product_uom._compute_quantity(self.product_uom_qty, self.product_id.uom_id)
Expand Down
2 changes: 1 addition & 1 deletion addons/sale_stock/tests/test_sale_stock.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def test_03_sale_stock_delivery_partial(self):

def test_04_create_picking_update_saleorderline(self):
"""
Test that updating multiple sale order lines after a succesful delivery creates a single picking containing
Test that updating multiple sale order lines after a successful delivery creates a single picking containing
the new move lines.
"""
# sell two products
Expand Down
2 changes: 1 addition & 1 deletion addons/sale_timesheet/tests/test_reporting.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ def test_profitability_report(self):
self.assertTrue(float_is_zero(project_so_2_stat['expense_amount_untaxed_invoiced'], precision_rounding=rounding), "The expense invoiced amount of the project from SO1 should be 0.0")
self.assertTrue(float_is_zero(project_so_2_stat['expense_cost'], precision_rounding=rounding), "The expense cost of the project from SO2 should be 0.0")

# global project should have an expense, but not reinvoicable
# global project should have an expense, but not reinvoiceable
project_global_stat = self.env['project.profitability.report'].read_group([('project_id', 'in', self.project_global.ids)], ['project_id', 'amount_untaxed_to_invoice', 'amount_untaxed_invoiced', 'timesheet_unit_amount', 'timesheet_cost', 'expense_cost', 'expense_amount_untaxed_to_invoice', 'expense_amount_untaxed_invoiced'], ['project_id'])[0]
project_global_timesheet_cost = timesheet7.amount + timesheet8.amount
project_global_timesheet_unit = timesheet7.unit_amount + timesheet8.unit_amount
Expand Down
2 changes: 1 addition & 1 deletion addons/sms/models/mail_thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def _search_message_has_sms_error(self, operator, operand):
return ['&', ('message_ids.has_sms_error', operator, operand), ('message_ids.author_id', '=', self.env.user.partner_id.id)]

def _sms_get_default_partners(self):
""" This method will likely need to be overriden by inherited models.
""" This method will likely need to be overridden by inherited models.
:returns partners: recordset of res.partner
"""
partners = self.env['res.partner']
Expand Down
2 changes: 1 addition & 1 deletion addons/stock/models/stock_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ def write(self, vals):
def _delay_alert_get_documents(self):
"""Returns a list of recordset of the documents linked to the stock.move in `self` in order
to post the delay alert next activity. These documents are deduplicated. This method is meant
to be overriden by other modules, each of them adding an element by type of recordset on
to be overridden by other modules, each of them adding an element by type of recordset on
this list.
:return: a list of recordset of the documents linked to `self`
Expand Down
2 changes: 1 addition & 1 deletion addons/stock/tests/test_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def test_in_2(self):
self.assertNotEqual(quant.in_date, False)

def test_in_3(self):
""" Receive 5 serial-tracked products from a supplier. The system should create 5 differents
""" Receive 5 serial-tracked products from a supplier. The system should create 5 different
move line.
"""
# creation
Expand Down
2 changes: 1 addition & 1 deletion addons/stock/tests/test_stock_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ def test_10_pickings_transfer_with_different_uom(self):

# Check quantity difference after stock transfer.
quantity_diff = before_out_quantity - self.kgB.qty_available
self.assertEqual(float_round(quantity_diff, precision_rounding=0.0001), 0.001, 'Wrong quantity diffrence.')
self.assertEqual(float_round(quantity_diff, precision_rounding=0.0001), 0.001, 'Wrong quantity difference.')
self.assertEqual(self.kgB.qty_available, 0.039, 'Wrong quantity available (%s found instead of 0.039)' % (self.kgB.qty_available))

# ======================================================================
Expand Down
2 changes: 1 addition & 1 deletion addons/stock/wizard/stock_picking_return.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See ICENSE file for full copyright and licensing details.
# Part of Odoo. See LICENSE file for full copyright and licensing details.

from odoo import api, fields, models, _
from odoo.exceptions import UserError
Expand Down
2 changes: 1 addition & 1 deletion addons/stock_account/models/stock_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ def _prepare_account_move_line(self, qty, cost, credit_account_id, debit_account
return res

def _generate_valuation_lines_data(self, partner_id, qty, debit_value, credit_value, debit_account_id, credit_account_id, description):
# This method returns a dictonary to provide an easy extension hook to modify the valuation lines (see purchase for an example)
# This method returns a dictionary to provide an easy extension hook to modify the valuation lines (see purchase for an example)
self.ensure_one()
debit_line_vals = {
'name': self.name,
Expand Down
Loading

0 comments on commit 355a5df

Please sign in to comment.