Commit Graph
108644 Commits
Author SHA1 Message Date
Xavier Morel 3979f6802e [#8530] convert exception handlers to except..as syntax
Futurize fixers:
* lib2to3.fixes.fix_except
2017-04-11 14:53:29 +02:00
xmo-odoo ca74b5e1c8 [IMP] convert PG errors through pg93 diag info
Previously availability of meta-information (failing constraint,
impacted table and column, …) in pg errors (e.g. constraint check
failure) was limited and only available through formatted error
messages, which could be localised (by PG itself) so not did getting
that information require string extraction it was brittle in the face of
localised instances.

Postgres 9.3 adds this meta-information to error diagnostic data
(`PQresultErrorField`), allowing easy programmatic access to it.
Psycopg2 [added a Diagnostic
object](http://initd.org/psycopg/docs/extensions.html#psycopg2.extensions.Diagnostics)
around the time pg9.3 was itself released.

Assuming Odoo now requires pg >= 9.3 we can remove the old string
munging extraction for diagnostic.

* funny story, the handling of 23505 didn't actually work because
  "duplicate key value violates unique constraint" is a literal part
  of the error message, I'd misunderstood "value" as a field name
  because my test model's field was called "value". Makes sense too
  since you can set UNIQUE constraints on multiple fields (and UNIQUE
  indices on expressions)
* for both errors, it should be possible to use the table_name or
  constraint metadata to provide messages about sub-model issues (a
  constraint on an m2o), but that's not currently handled

Fixes #15323
2017-04-11 14:51:53 +02:00
Laurent Smet a8994b4075 [IMP] account: use max_date instead of create_date for aged reports
Aged receivable/payable was using create_date of account_partial_reconcile to decide if a partner needs to be shown at a given date or not.
While it was not wrong, our decision to use the create_date was based on the fact that we wanted to be able to render the exact same report we had at a past date, so a the date of the reconciliation would be important... but since the unreconciliation was not forbidden it wasn't really the case.
Moreover, in some case where reconciliation is not at the same time the payment is recorded, this choice
 - was confusing people about results given by the aged receivable/payable report.
 - was confusing people about the 'Paid on...' line in the payment widget on the invoice, as they would see there a date unused by the system (although they would have liked too)

This was discussed in opw 31844. Was PR #16016
2017-04-11 11:09:01 +02:00
qdp-odoo 84e4f6b08c [FIX] base: fixing test_new_api after previous commit.
New test introduced at https://github.com/odoo/odoo/commit/3214ca98206e5f99e2ab1d471ce1ef543057c9f6 tested the type of a column we changed from datetime to date in https://github.com/odoo/odoo/commit/01142701cc566b3084326af9649fd85db02b4220. Picked another datetime field to do the test
2017-04-11 08:39:34 +02:00
qdp-odoo f019479350 [FIX] account: suppress warning when account currency = company currency 2017-04-10 17:36:54 +02:00
qdp-odoo 01142701cc [REF] res_currency: res.currency.rate name is now a date instead of a datetime
Since we only uses date fields in accounting, it does not have any sense to have a datetime for currency rate:
 - it is error prone for the users as the timezone they're in will affect the rate (and possibly take yesterday's rate).
 - it involved the possibility to create several rates per day, which was not fully supported and might give undeterministic results (so we also add a constraint in order to only have one rate per day)
2017-04-10 16:08:07 +02:00
Fabien Meghazi aafa2f12c4 [IMP] web: improve qweb concatenation error logging 2017-04-10 16:01:30 +02:00
Fabien Pinckaers 4585b14cd1 [MERGE] account: menus for credit note + avoid negative invoices 2017-04-08 19:06:21 +02:00
Fabien Pinckaers 55ea4b16f0 [IMP] account: better CSS/XML for settings 2017-04-08 17:57:14 +02:00
Fabien Pinckaers 525d094ef6 [IMP] account: misc UX improvements
Allow to configure the bank statement import mode from kanban
    When doing a manual journal entry, don't show the maturity date
    Removing Issued total, using credit instead (less code, more
    useful to have due amounts, instead of overdue)
    Creating a bank, set a name 'BofA Current' and an
    account number (that way, the account.account is based
    on name)
    Settings Wizard & menus: better sentences
    Statement CSV Import: installed by default (it
    does not add any menu)
    remove use_in_payment: complex field, only
    used for a default value
    Small code cleanup
[IMP] sale: moving order date to secondary tab (strange on a quotation)
2017-04-08 16:52:05 +02:00
Fabrice Henrion a76ed8f2f3 [IMP] marketing_campaign: better icon
Keyboard is not a clear icon.
Calculator is better for statistics.

Closes #16095
2017-04-07 15:48:59 +02:00
Fabrice Henrion 5420c92b89 [IMP] mail: better notification icon
This icon allows to control what types of notifications you want to receive.
That an icon typically used for "notifications" is better than an icon
typically used for "reminders" and "alarms". There is the risk of a wrong
expectation because reminders and alarms have a notion of time associated to
them: reminders in the future or alarms in the future at a given time. In the
case of a follow, there is no "future time" concept, whereas there is a
notification concept. It makes even more sense when we look at the placement of
this icon on the right side of the label "Following".

Closes #16170
2017-04-07 15:40:55 +02:00
Levent Karakaş 7e8d37462b [ADD[ base: address format for Turkey
Closes #16304
2017-04-07 14:13:37 +02:00
Martin Trigaux 58918fb826 [FIX] account: bad forward port
Field remaining from 9.0 when cherry picking #16236 to #16282
2017-04-06 15:57:03 +02:00
Thomas Binsfeld f79e2fd318 [IMP] account: add prepare methods for exchange diff move lines
Such prepare methods are useful in situations where we want to propagate some
analytic dimension to exchange difference move.

Closes #16282
2017-04-06 15:17:17 +02:00
lap-odoo ba1bf379f4 [IMP] l10n_ar: update taxes descriptions
Replace taxes descriptions code into a clear tax description for l10n_ar. Was PR #16201
2017-04-06 15:08:33 +02:00
lap-odoo 70d351ebb2 [IMP] l10n_ca: update taxes description
Replace taxes descriptions codes by clear tax description for l10n_ca. Was PR #16202
2017-04-06 15:06:48 +02:00
lap-odoo 8d3556859d [IMP] l10n_ec: update account_tax description
Was PR #16203
2017-04-06 15:02:02 +02:00
Raphael Collet 6498f35145 [IMP] base: add individual module exclusions 2017-04-06 11:17:58 +02:00
Raphael Collet c29cac23fb [IMP] base: add boolean field 'exclusive' on module categories
When set, this flag restricts the installation of several modules
from the same category.
2017-04-06 11:17:58 +02:00
Fabien Pinckaers 846bf1bb4a [IMP] sale: analytic account visible for sales & quotations 2017-04-06 09:47:31 +02:00
Pierre Masereel a1dc9ab874 [IMP] mrp: Planning menu entry
Moving main menu item 'Planning' from mrp_workorder to mrp.

We put this main menu in the module mrp to add items in it in module
mrp_workorder and mrp_mps without adding a dependency of mrp_workorder
to mrp_mps
2017-04-03 17:03:51 +02:00
Martin Trigaux 4b432d169d [FIX] base: the doctstring is a lie 2017-04-03 14:37:02 +02:00
Fabien Pinckaers e25dd35a25 [ADD] hr_org_chart: organizational chart on employee forms
This commit introduces a new widget specific to employees. It is used
to display an org chart centered on the current displayed employee.
Two levels of managers as well as subordinates are displayed.

It is contained in its own module and its installation is available from
hr settings.

Thanks to Stefano Rigano <sri@odoo.com> (@stefanorigano) for design and UX
implementation.
2017-04-03 10:38:03 +02:00
Thibault Delavallée 855e7eb043 [IMP] hr: use user data when creating an employee if available 2017-04-03 10:35:44 +02:00
Thibault Delavallée 68a317f164 [REF] hr: remove unnecessary city field on employee
It is not used and is a non stored related on the work address. It is
therefore not really necessary to keep it.
2017-04-03 10:35:30 +02:00
Thibault Delavallée 838bd31914 [MOV] hr: reorganize fields of hr.employee model
No technical or functional change. Only reorganizing fields to better
understand the model. Future commits will change a few fields in this
model and this commit prepares it by classifying a bit them.
2017-04-03 10:35:25 +02:00
axj-odoo 47fea3f68e [IMP] mrp: change work order message description 2017-03-31 15:08:47 +02:00
amoyaux 08c610835f [IMP] mrp: Only show products with active bom
Currently, if you create a manufacturing order, you can select
all the product that have a BOM. But some product have BOM that
are archived or that can't be manufactured.

This commit add a constraint in the domain for product field.
The constraint ensure that BOM are not archived nor phantom BOM.
2017-03-31 10:57:18 +02:00
Martin Trigaux 2382520c34 [IMP] odoofication 2017-03-30 08:59:13 +02:00
Fabrice Henrion bc747f8c4a [IMP] website_sale: improve label
It is confusing to see an existing payment transaction on an SO next to its
total even though it doesn't necessarily mean that the SO is paid because the
transaction could have failed. Additionally, if there are several tentative
transactions for one SO, only the latest one is accessible  through this m2o.

Closes #16128
2017-03-30 08:28:45 +02:00
Dhaval Panchal 5732bf2d64 [IMP] sale_stock: routes in sale orders default and no create
When the module sale_stock is installed, the MTO route is now by default
available on sale order lines.

We also remove the ability to create routes from sale order lines, as a
salesman will never have to configure new stock routings.
2017-03-29 14:20:56 +02:00
Christophe Simonis ce4cc6ebb4 [MERGE] forward port branch saas-15 up to 7bf7f392ad 2017-03-29 13:48:51 +02:00
Christophe Simonis 7bf7f392ad [MERGE] forward port branch saas-14 up to 79975f7cec 2017-03-29 13:46:52 +02:00
Martin Trigaux d84b795b0a [ADD] test_translation_import: new no update test
To verify the translations are indeed not overwritten
2017-03-29 13:41:09 +02:00
Martin Trigaux 1703a2f806 [FIX] base: do not overwrite noupdate translations
If a record is tagged with no update, the translations must not be replaced,
even if the "overwrite translation" checkbox is checked.

If somebody renames a noupdate and translated record, updating the translations
must keep the new translations.

Closes #14768
2017-03-29 13:41:09 +02:00
Christophe Simonis 79975f7cec [MERGE] forward port branch 10.0 up to 0ff9af64ef 2017-03-29 13:34:41 +02:00
Goffin Simon 0ff9af64ef [FIX] hr_expense: Creation of entries from several expense lines
When posting journal entries for an hr.expense.sheet with several expense lines
(by clicking on the button "Post journal entries"), all the account move lines
created for the same sheet must be linked to the same account move because
the model hr.expense.sheet has just a field "account_move_id" to access all the entries
(by clicking on button "Accounting Entries")

This commit reverts f97eb0ac2b

opw:715523,709930,725798,716239
2017-03-29 13:11:25 +02:00
qsm-odoo c04dfec023 [FIX] web: make the domain field a "block" field
The domain field needs space to be rendered. Even with its "in_dialog"
option activated, the readonly representation can take some space.
If there is not enough space, it will be a mess to read it and the
"-> x records" button can also overflow the "Add filter" button.

This commit makes the field to be rendered as a "block", which fixes
the problem in all current cases.
2017-03-29 12:26:11 +02:00
Thibault Delavallée c168830b66 [REV] revert commit 83e8ae43b0
Indeed people installing modules depending on sales team with sales team
not being updated before that commit.

ChsNote: Do not forward-port.
2017-03-29 10:53:16 +02:00
Thibault Delavallée 5fb732bf91 [REV] revert commit 0f17d3a348
Indeed this causes issues for people installing issue with project having
been installed before that commit.

ChsNote: Do not forward-port.
2017-03-29 10:53:03 +02:00
Martin Geubelle 1a2c05e98b [IMP] web_kanban: allow column creation on custom model
In the kanban view, if the default_group_by is a many2one, it's possible
to quick create a new column (which will create a new record in the
relation model).

However, the field `name` was hardcoded during the creation, which means
that a custom model with `x_name` couldn't be correctly created.

This commit allows it by using `name_create` instead.
2017-03-29 10:27:18 +02:00
Simon Lejeune e05333f8f5 [FIX] mrp: layout issue in workorder messages
The alert box was flickering if empty: at each click on the status
button, the box was appearing and disappearing quickly. This is probably
due to a bug in the form view that do not wait for the evaluation of the
attrs. This bug is fixed in the new views, but only if the attrs is
fixed. Indeed, as the attrs condition is

    attrs="{'invisible': [('production_messages', '=', False)]}"

the field was never set to False. This is because the compute method was
doing

    workorder.production_messages = "<br/>".join(messages)

So, even if `messages` was empty, production_messages will be set to ''.

In [1]: 'aaa'.join([])
Out[1]: ''

So we fix the condition to set False to the field if the string is
empty.

In [6]: 'aaa'.join([]) or False
Out[6]: False
2017-03-29 10:08:20 +02:00
Simon Lejeune 7a9c4b068c [FIX] mrp: layout issue in workorder messages
A 50 px height was hardcoded, so if you have more than 2 or 3 messages
they were displayed outside of the messages box. We remove this
hardcoded height and it looks better.
2017-03-29 10:08:20 +02:00
Christophe Simonis fb2504b24c [MERGE] forward port branch saas-15 up to aebd043662 2017-03-28 18:38:49 +02:00
Christophe Simonis aebd043662 [FIX] web_editor: correct syntaxerror
Oversight of previous forward-port
2017-03-28 18:27:42 +02:00
Christophe Simonis 2df5faa551 [MERGE] forward port branch saas-14 up to 2f68e9e93a 2017-03-28 18:05:31 +02:00
Christophe Simonis 2f68e9e93a [MERGE] forward port branch 10.0 up to 72fa3e8bda 2017-03-28 17:27:19 +02:00
Martin Trigaux 55895c7de1 [IMP] point_of_sale: correct model description 2017-03-28 17:03:23 +02:00
qsm-odoo 72fa3e8bda [FIX] web: properly display tooltips with much data
When there is a lot of texts to display in a tooltip, it will overflow
the viewport vertically as the max-width of the tooltip is set at 200px
(bootstrap default). This commit increases the max-width to the
viewport full-width.

opw-725804
2017-03-28 16:45:35 +02:00