Commit Graph
102174 Commits
Author SHA1 Message Date
Goffin Simon a5b3c6e748 [FIX] account_asset: label of account_asset_id field
The rigth label for this field account_asset_id is in fact
"Expense Account".

opw:667575
2016-02-05 11:35:26 +01:00
Thomas Groutars 7c432c8b65 [FIX] Fix get_default_ method decorator and definition
In sale.config.settings, the method get_default_sale_config has api.multi decorator.
However, the method definition should be def get_default_sale_config(self, cr, uid, fields, context)
(see https://github.com/odoo/odoo/blob/9.0/openerp/addons/base/res/res_config.py#L534 ).
The api.multi decorator results in the model being browsed with fields as ids, which results in that kind of queries:

select * from sale_config_settings where id in ('generate_sales_team_alias')

This change corrects the method definition to fix that.
2016-02-05 11:24:06 +01:00
Raphael Collet 35bcd2c2a4 [MERGE] branch 'master-models_inheritance-rco'
Modify the implementation of inheritance (with `_inherit`) between models, in
such a way that extensions to a given model are visible to all its children
models.

Inheriting model A to extend it adds the current class to A's model class.
This works like before, except we do not recreate the model class.

Inheriting from A in B adds A's model class as a parent of B's model class, so
that all modifications in A's model class are visible in B's model class.

Moreover, the `BaseModel` class has been introduced as an abstract model
`base`, and is implicitly inherited by all other models.  That model may be
extended to add a feature on all models, or override a method on all models.
2016-02-04 17:29:15 +01:00
Cedric Snauwaert 4de3f4c4ba [FIX] expression: fix search for o2m with non existing id
The result of searching on a o2m field for a missing ID was
the whole set of records which do not have any lines in the
o2m fields. This is definitely not the desired behavior,
and could lead to disatrous performance, because the
returned set could be extremely large.

One example of such behavior is for recomputing fields
in the env cache in 8.0+. When a o2m line gets deleted,
it triggers the recompute of any dependent fields.

In order to locate the records to recompute, the ORM
searches for the 'parent' records in the comodel table.
When this operation is done by 2 users concurrently
the o2m line may not exist anymore, and the bug
is triggered: dependent fields are recomputed on a possibly
very large set of records that did not need any recompute!
2016-02-04 17:10:08 +01:00
Nicolas Lempereur 7c11d4e70f [FIX] web_editor: minor tweaks IE11
In IE11 the values can be not string (for example a number and so not
have .indexOf method), but then there will no be !important bits and we
can just ignore this feature (which check if an overriding rule has an
!important flag).

There was another edge case when getting a "" set style, we get undefined.

opw-667917
2016-02-04 16:50:22 +01:00
Denis Ledoux 9c594cb3cd [FIX] website: optimize SEO in other languages than the default one
When connected as a website manager,
in another language than the default
website language,
it was not possible to use the optimize
SEO feature, because it needed
variables that were not available if the website
was considered as translatable only,
not editable. This is the case
when you are in any other language
than the default website language,
`editable` is `False`
and
`translable` is `True`.

This is a change of behavior compared to Odoo 8.0,
where `editable` was considered to `True`
even if you were only editing the website translations.

opw-668632
2016-02-04 16:35:34 +01:00
Raphael Collet d273415beb [FIX] models: track correctly which module introduced a given constraint
If a module adds a constraint on a given model, deinstalling that module must
remove the constraint from all the models that inherited it.
2016-02-04 15:52:06 +01:00
Raphael Collet 408330a655 [FIX] fields: track correctly which module introduced a given field
If a module adds a field on a given model, deinstalling that module must remove
the field from all the models that inherited the given field.
2016-02-04 15:52:06 +01:00
Raphael Collet dd0a3ea92f [FIX] base: in upgrade wizard, commit transaction before reloading registry
Not committing the current transaction may block the deinstallation of a
module.  Specifically, if a module adds a field on model `ir.module.module`,
its deinstallation will block when trying to remove the column, because the
wizard's pending transaction made a query on the table `ir_module_module`.
2016-02-04 15:52:06 +01:00
Raphael Collet 34cba4e0e5 [FIX] fields: reset attributes for columns that override fields
In particular, reset `compute`, `inverse`, `search` and `related`.  This is
necessary because all models implicitly inherits from model 'base', and the
latter defines `display_name` as a computed field.
2016-02-04 15:52:06 +01:00
Raphael Collet 53572ba4c6 [IMP] models: add the base model as an abstract model in the registry
The model `base` is implicitly inherited by all models, and can be extended as
any other model.
2016-02-04 15:52:06 +01:00
Raphael Collet 0040632696 [FIX] models: after extending a model, recompute its children models attributes
This is necessary when adding `_inherits`, `_depends` or constraints to a model.
2016-02-04 15:52:06 +01:00
Raphael Collet 58292bf311 [FIX] fields: in _setup_default, do not lookup _default in model classes 2016-02-04 15:52:06 +01:00
Raphael Collet 8a7552e5b7 [FIX] models: exclude magic, custom and inherited fields from a model's proper fields
Those cases can now appear, since a model inheriting (with `_inherit`) from
another model can observe those extra fields from its parent model's class.
2016-02-04 15:52:05 +01:00
Raphael Collet b56cdc9e17 [FIX] models: make Model and TransientModel subclasses of AbstractModel
With this subclassing, the MRO of the model class will always traverse `Model`
before `AbstractModel`.  This guarantees that inheriting from an abstract model
does not make the current model abstract.
2016-02-04 15:52:05 +01:00
Raphael Collet 3eb4e919f4 [FIX] models: during setup, reset properties memoized on model classes
This is necessary, because a model's class is kept when applying model
extensions.
2016-02-04 15:52:05 +01:00
Raphael Collet 8eeed3dbaf [FIX] pad, website: models pad.common and website.seo.metadata should be abstract 2016-02-04 15:52:05 +01:00
Raphael Collet bcfff7cea5 [FIX] web_editor: simplify inheritance specs 2016-02-04 15:52:05 +01:00
Raphael Collet fe2d819474 [IMP] models: add _inherit_children on models to handle base model extensions
When extending an inherited model, the registry now automatically updates the
schema of children models.
2016-02-04 15:52:05 +01:00
Raphael Collet d76979c03f [IMP] models: make model extensions visible to children models
When a model B inherits from model A, any extension of model A should be
visible in model B.  We achieve this by:
 - making B inherit from the class of A in the registry;
 - making model extensions modify the model's base classes.
2016-02-04 15:52:05 +01:00
Yenthe e72afefaa7 [IMP] web_calendar: Remove one2one reference
This one2one reference is no longer needed since one2one fields have been
deprecated for ages

Closes #10746
2016-02-04 14:57:52 +01:00
Antonio Espinosa d036e3be1a [FIX] membership: remove membership line when deleting invoice
Apply the same behaviour as the unlink done on account.invoice.line.
This should properly be implemented with a ondelete=cascade but this is not
possible in stable version as it requires an update.
2016-02-04 14:48:47 +01:00
Denis Ledoux 36b26ebaae [MERGE] forward port of branch 9.0 up to ff3184e 2016-02-04 14:41:55 +01:00
Raphael Collet a3ec5a35a5 [FIX] fields: in copy_cache, add single records to set todo 2016-02-04 14:33:53 +01:00
Martin Trigaux ff3184ed82 [FIX] packaging: include eml files in builds
The file addons/crm/test/customer_request.eml is used in
addons/crm/test/crm_lead_message.yml

Fixes #10750
2016-02-04 14:16:43 +01:00
Goffin Simon 0923d1609d [FIX] purchase: _compute_qty_received
Copied from _get_delivered_qty in addons/sale_mrp/sale_mrp.py
When a product with a BOM is delivered, the delivered qty must
be the produt qty set in the PO line.

PS: There is no dependencies between mrp and purchase

opw:668572
2016-02-04 14:06:53 +01:00
Raphael Collet 0f2e7d783e [FIX] fields: make copy_cache use a todo list instead of recursion
The recursion was based on an incorrect assumption: the cache of the target
environment is initially empty.  If another computation left some value there,
the copying is incomplete, and that causes bugs in onchanges.
2016-02-04 13:48:28 +01:00
Yannick Tivisse 1723ed5842 [FIX] hr_holidays: Display the remaining leaves on Leaves Analysis
There was a domain on the action to display only the leaves and not
the allocations. Because of this, it was impossible to display the
used leaves, the allocated leaves and the remaining leaves on the same
view, which is frustrating for a HR when he wants to reports some leaves
from a legal year to another
2016-02-04 11:59:43 +01:00
Joren Van Onder efe263280d [FIX] point_of_sale, pos_restaurant: temporary orders
pos_restaurant creates temporary orders when splitting the bill. This
ensures those are never saved to persistent storage. As soon as the user
clicks on the pay button, the order is not considered temporary anymore
and will be saved.

Closes #10767
Fixes #10350
opw-666141
2016-02-04 11:50:21 +01:00
Jérome Maes cf8b05a16d [FIX] website_theme_install : bad method signature
In new api, the context in encapsulated and propagated with 'env'. There is no need to add in the signature. Method decorated with api.multi/api.model replace method(self, cr, uid, context).
2016-02-04 11:46:04 +01:00
Yannick Tivisse b2cd56efa0 [FIX] stock: A stock user shouldn't be automatically in multi locations 2016-02-04 11:19:09 +01:00
Yannick Tivisse d5704262bd [IMP] Stock: Several improvement on locations and warehouses settings
- Separate group_stock_multiple_locations into 2 groups:
  o group_stock_multi_locations
  o group_stock_multi_warehouses
- Add a selection fields to manage the 3 levels of warehouses management complexity:
  o Manage 1 WH with 1 location
  o Manage 1 WH with multi locations
  o Manage multi WHs with multi locations
- Display the menuitems and fields accordingly
- On a company creation : Create a related Warehouse
- stock.location : Add a helper on the parent location
- stock.warehouse : Add a helper on the company_id field
2016-02-04 11:19:09 +01:00
Yannick Tivisse ae9b29510a [MOV] stock: create res_company.py file from the overridden part in res_config 2016-02-04 11:19:09 +01:00
Goffin Simon 703a2faf78 [FIX] project_timesheet: Remaining Hours
The remaining hours of a task must be equal to the planned hours
if this task is not linked to a account.analytic.line

opw:667309
2016-02-04 09:28:48 +01:00
Denis Ledoux 9fa73d10cf [FIX] account: set payment_method_code as readonly
The payment method code is not supposed to be changed
from an `account.payment`.

Besides, this field is only used for technical reasons,
as stated:
```
Technical field used to adapt the interface to the payment type selected.
```

There is therefore no reason to not set it as readonly.

Not setting it as reandonly could lead to a `write`
operation on the `account.payment.method` with the value
of the code, even if this is already that one set, and
such an operation could be prevented by the access rights.

opw-668624
2016-02-03 18:35:43 +01:00
Yannick Tivisse 215cad9cae [IMP] account: Protip for the ctrl+enter access key
A similar protip has been added in the enterprise 'account_reports' module.
We took this opportunity to rename the class protip into o_protip and to apply
this kind of style with standard attributes and classes + to correct typos
2016-02-03 18:27:38 +01:00
Olivier Dony d67d24d8b4 [MERGE] Forward-port 9.0 up to 93e8bf8ccf 2016-02-03 17:19:16 +01:00
Olivier Dony 93e8bf8ccf [MERGE] Forward-port saas-6 up to 1f022a0b4a 2016-02-03 16:55:41 +01:00
Olivier Dony 1f022a0b4a [MERGE] Forward-port 8.0 up to rev. 67a63e2cc9 2016-02-03 16:53:30 +01:00
Olivier Dony 67a63e2cc9 [MERGE] Forward-port 7.0 up to rev. cb609bd425 2016-02-03 16:42:29 +01:00
qdp-odoo 967be70c52 [FIX] account: tax of type 'group' wasn't propagating correctly the base of computation for next taxes (in case one of the children had the field 'Affect Base of Subsequent Taxes' set). Fixes issue 641078 2016-02-03 16:37:41 +01:00
Denis Leemann 5b4d303d05 [FIX] kanban: 180 in Firefox 43+ and Chrome 48+
The kanban CSS applies both a 90 degree rotation and a top-bottom rtl
writing mode to folded kanban group titles. This was initially fine
because browsers didn't support the (SVG) "tb-rl" value for writing-mode
and the property was thus ignored. Firefox 43 (December 2015) and Chrome
48 (January 2016) added support for this value, and thus now end up with
a 180 degree rotation on the title.

Issue #7955 fixed it in 8.0 due to MSIE impact, this is essentially a
backport to 7.0.

close #10687
2016-02-03 15:03:43 +01:00
Géry Debongnie 5465dccd69 [FIX] mail: prevent the composer to break layout in client action
The composer can grow vertically.  It will eventually grow out of the
chat content, which breaks the layout.  This commit fixes the issue.
2016-02-03 14:36:30 +01:00
Géry Debongnie 90d4f76100 [FIX] mail: users can now reply directly in documents from channels
A missing feature in discuss was the possibility to directly reply to a
message from a channel without opening the document.  This commit add
that feature.  Now, there is a small 'reply' icon in channels (including
inbox/starred) if the message comes from another document.  This icon
opens an extended composer, which will post the message in the document
chatter.
2016-02-03 14:36:30 +01:00
Thomas Groutars cc36e03ddc [FIX] product_visible_discount: wrong argument type
Fix call to v8 method with wrong argument type

Closes #10745
opw-668544
2016-02-03 13:30:17 +01:00
Martin Trigaux aca28c82b4 [FIX] website_sale: do not compute price of every pricelist
This controller was very slow as not providing a pricelist computed the price of
all products of all pricelists.
Instead only fetch the prices for the useful products.
2016-02-03 12:05:42 +01:00
Yannick Tivisse 0b583cbbd1 [IMP] website_forum: Display a summary card on shared forum posts on twitter
See: https://dev.twitter.com/cards/types/summary
2016-02-03 11:32:01 +01:00
Yannick Tivisse 9d4781697b [IMP] mrp,purchase,stock: Default lead times set to 0
Lead times are too advanced for most of our online users. Most of the companies just
buy and sell and don't manage scheduling. As an example, when they do MTO, they
purchase the same day they sold.

The problem with current lead time is that users don't understand the dates produced
on delivery orders and receptions. They even have receptions in the past, and they
don't understand why. (customer lead time default to 7 and vendor lead time to 1,
as well as security days, ...)
2016-02-03 10:02:46 +01:00
bima d01ecb6e79 [FIX] stock: wrong variable used in _handle_renaming
Could incorrectly rename the stock.location.path objects, and in case
the route has push_ids but no pull_ids would crash the method entirely.

closes #10747
2016-02-03 09:55:43 +01:00
Yannick Tivisse 23261f330b [IMP] crm: Restructure and Rephrase crm planner following fgi advises
- Restructure the menus this way:
 Sales Flow
 Pipeline
 Proposal
 Deployment
    Incoming emails
    Customers
 Products
 Prices
 Reporting
 Customizations

- Add a short intro about leads in Incoming emails (why using leads?
first contact, contact forms) -> in incoming email menu

"There are several ways for your company to generate leads with Odoo CRM.
One of them is using your company's generic email address as a trigger
to create a new lead in the system. In Odoo, each one of your sales teams
is linked to its own email address from which prospects can reach them.
For example, if the personal email address of your Direct team is
direct@mycompany.example.com, every email sent when a new prospect
contacts you will automatically create a new opportunity into the sales team.

That's the easiest way to integrate Odoo with third party apps.
2016-02-03 09:36:19 +01:00