Commit Graph
103484 Commits
Author SHA1 Message Date
Yannick Tivisse 24d8fe0aef [IMP] project: Add 3 steps in web_tour 2016-06-22 16:04:06 +02:00
qsm-odoo 6227abe355 [FIX] web_tour: anchor events
* Correctly bind "input" (instead of "change") or "mousedown" event
according to the anchor type. Also, only valids left clicks.
* Correctly unbind these events.
2016-06-22 11:52:42 +02:00
qsm-odoo ec6083c0c3 [FIX] web_tour: observe when dom is ready
Start observing the DOM (MutationObserver) only when it's ready.
2016-06-22 11:52:42 +02:00
Christophe Matthieu 8d09a11cea [FIX] web: FieldX2Many must use AbstractManyField is_false method
If the method return false, when a user write require="1" on a x2many field, the content is valid that there have none or a value.

The method was overwrited for a visual change (display the field x2m in readonly mode when they are not value) but is_false is priority use to ensure datas.
2016-06-22 09:25:25 +02:00
Fabien Pinckaers 5fd1f50577 [FIX] expense: when paid by company: marked as paid directly 2016-06-21 17:26:37 -07:00
Fabien Pinckaers b0c9ee669b [FIX] Product view opens as a list view
[IMP] improved planner content
[IMP] Misc usability improvement:
	cost instead of sale price on product form
	improved views and terminologies
	journal entry is RO
2016-06-21 17:23:49 -07:00
Raphael Collet 8be3781501 [REM] ir_actions: remove no-longer-supported field auto_refresh from act_window 2016-06-21 17:56:56 +02:00
Christophe Simonis da53a27a5d [MERGE] forward port of branch saas-11 up to c88c70e 2016-06-21 16:24:38 +02:00
Yannick Tivisse f066b1ec4f [IMP] hr_expense: Onboarding improvement + mail gateway
1/ Modify the no content help message for hr_expense with a dynamic part
   which describe how to create a new expense by mail
2/ Mail gateway mechanism. New customizable email alias expense@domain
   that creates a new expense by sending an email to it. Check several things
   - Check that the email_from is the same than one of the employees or than
     on of the related users to employees. If not, send back an email to say that
     the expense will not be created.
   - If the email address is valid, check if something is between brackets '[]'
     If it is the case, check if it is linked to a product internal reference
     and set it accordingly. If nothing is found, use a default product
     'Fixed Cost'
   - If one/several float(s) are found in the mail subject, take the last
     occurence and set it as the expense total amount.
3/ If a product template is created, to not add taxes on it. We don't expect it
   to have additional taxes
4/ Under Expenses -> Configuration -> Expense Product, use a simplified product
   view with only the needed fields.
5/ When generating the account move lines, use the account defined on the expense
   line, not the sheet
6/ When creating a payment, make a reconciliation on the payable account move lines
   That way, if the total amount on the expense is paid, the expense will be set to
   paid automatically when registering a payment
7/ Add a one-page planner to explain how to use the email alias
8/ The field account_id on the expense sheet was informative. After some tests, it
   seems that it's more confusing than helping. So we removed it
9/ Add a domain on the field 'bank_journal_id' to select journals of
   type 'cash' or 'bank'
10/ If the number of expense lines is equal to 1, the expense summary on the expense
    sheet should be the same name the line. So the process can be done in one click
2016-06-21 14:09:48 +02:00
Christophe Simonis c88c70e900 [MERGE] forward port of branch saas-10 up to d73f0d8 2016-06-21 13:58:24 +02:00
Christophe Simonis d73f0d8063 [MERGE] forward port of branch saas-9 up to 68f5163 2016-06-21 12:42:34 +02:00
Christophe Simonis 68f51630b9 [MERGE] forward port of branch 9.0 up to e8827d0 2016-06-21 12:16:53 +02:00
Christophe Simonis e8827d013f [MERGE] forward port of branch saas-6 up to be94653 2016-06-21 11:59:15 +02:00
Christophe Simonis be94653462 [MERGE] forward port of branch 8.0 up to fe15829 2016-06-21 11:55:55 +02:00
Christophe Simonis 0a2317d303 [FIX] test_new_api,web: tests 9.0 adjustments
Rev e37ba61 forward-ported 8.0 revision f02b230 from PR #12379.
This patch introduces extra tests and views for o2m onchange behavior,
including new fields in the test models.

In 9.0 a new convert_to_onchange() mechanism had been
introduced at 9f81c6d

The combination of both requires some adaptation to the
expected results of the new tests and adaptation of existing tests.

The test models in `test_new_api` have an implicit depencies between
models which cannot be express on ORM:
    messages depends on participants of their discussion.

So, when editing a discussion, the field `participants` should be
processed before field `messages`. This is not always done because
field processing order depends of the iteration order of a `dict` (which
is undefined in python).
The testing tour `widget_x2many` worked by chance until now.
Adapt the tour to save the participants before the messages.
2016-06-21 11:23:18 +02:00
Josse Colpaert fe15829c16 [IMP] stock: when applying a push rule the new move should not be linked to the same procurement anymore 2016-06-21 10:16:07 +02:00
Jérome Maes bd61e9f651 [FIX] google_calendar : rename 'class' field into 'privacy'
Complete the commit dae0157d7b. Thanks to jke ;)
2016-06-21 09:08:16 +02:00
Jérome Maes dae0157d7b [REF] calendar: rename 'class' field on calendar.event
'class' is a reserved name in python. This will cause problem during new API migration.
2016-06-20 16:19:32 +02:00
Jérome Maes cfb8e8700a [FIX] calendar: view meeting detail when not logged
Since the new QWeb engine, `groups` directives on template
rendered in a route with auth=none is simply ignored, since
all is done as SUPERUSER_ID, it was impossible to instanciate
the webclient to check if the session is valid and to display
meeting info or redirect to event form view.

It seems that we don't want to fix this because routes auth=none
are rare, and special. So it is not considered as a bug.

The fix for calendar is, however, to do redirection or template
rendering server side.
2016-06-20 16:19:32 +02:00
Daniel Dico 3cb64f517a [IMP] payment_stripe: better content
show logo, merchant name, description, currency and amount on the stripe
checkout page.

Add the field stripe_image_url to display the logo that was configured according
to https://stripe.com/docs/checkout
Do not use company logo as there is no guarantee on the image ratio.

Closes #12378
2016-06-20 15:59:18 +02:00
Goffin Simon c77745b9c5 [FIX] sale, slae_stock, website_quote: get sale_delay in onchange_template_id
Inspired from a706ada

opw:681245, 681289, 681285
2016-06-20 15:13:01 +02:00
Christophe Simonis 91e04da933 [MERGE] forward port of branch 9.0 up to e37ba61 2016-06-20 14:28:20 +02:00
Goffin Simon 6101b856f0 [FIX] Wrong amount currency in account move line
When computing the amount currency, the date must be set in the context
to use the right currency rate.

opw:680693
2016-06-20 14:20:53 +02:00
Christophe Simonis e37ba61832 [MERGE] forward port of branch saas-6 up to b87a93a 2016-06-20 14:20:03 +02:00
Jeremy Kersten 757a917088 [FIX] base: add disabled users at write on 'users' or 'implied_ids' of res_group
If a user is disabled but in a implied_ids group, it was ignored and
so not added.

Eg: public_user is by default disabled,
So:
    <record model="res.groups" id="base.group_public">
        <field name="implied_ids" eval="[(4, ref('foo'))]"/>
    </record>

will not add the public_user in group foo.

It is coherent with the method execute of resConfig which already use the
active_test=False.

Courtesy of @odony for review
2016-06-20 13:38:26 +02:00
Christophe Simonis b87a93a091 [MERGE] forward port of branch 8.0 up to 5b1beec 2016-06-20 13:34:46 +02:00
Jeremy Kersten 6ad47aeb68 [FIX] web: fix migration to new api
Context in new API is not more a parameter.
Before this fix, context was interpreted has attribute parameter
and so the fields_get return empty dict.

This commit fix tracback when we try to export data in list view from
any model. The wizard try to know the fields from current model and a
traceback is raised (key error for  field['string'])
2016-06-20 13:05:20 +02:00
Nicolas Martinelli eea15ac92e [FIX] point_of_sale: taxes after fiscal position
Commit 358e285 introduces fiscal positions on the PoS. The new taxes
applied should be used in the form view of the pos order lines and in
the detailed sales report.

opw-680796
2016-06-20 12:46:03 +02:00
Martin Trigaux da82a6b705 [FIX] payment_stripe: correctly compute reference number
As explained in 15f27b26, the transaction information should be computed when
hitting the "pay now" button, not at page rendering (e.g. in case of users going
back to previous page).

Stripe do not work as typical providers as it does not redirect to the provider
page but opens a popup.
The route /shop/payment/transaction/<id> needs to be called manually.
2016-06-20 12:31:06 +02:00
Christophe Simonis 5b1beec1f2 [FIX] models: commit *before* trying to set NOT NULL constraint
Setting NOT NULL constraints on required fields may fail if there are
any row with unset value for this column.
The ORM handle this case by catching the exception raised and warning
user.

However, not commiting the current transaction before, will rollback
changes made before like setting default values or renaming a column.
2016-06-20 11:53:59 +02:00
Denis Ledoux 1061cb5696 [FIX] expression: search on *2many fields with domain
Some one2many fields have a domain specified
in their definition
e.g.
`mail.thread`.`message_follower_ids`
`hr.applicant`.`attachment_ids`
`project.task`.`attachment_ids`

which is required for the one2many field to make
sense. For the mail thread, it does not make sense
to include the followers of other models with the same
`res_id`.

This domain must be took into account when doing a
'like' search on the one2many field
e.g. Followers contains demo
Otherwise it will include threads from other model

opw-680825
2016-06-20 10:53:37 +02:00
Nicolas Martinelli 8a1d7dfe7b [FIX] sale_stock: do not count discount twice
When a product is a kit and a discount is applied thanks to a pricelist,
the discount is counted twice if the invoice is created from the stock
picking.

This is because the pricelist will modify the price unit, but moreover
the discount will be applied a second time by the method
`_compute_price` of the account move line.

opw-676838
2016-06-20 08:36:19 +02:00
Odoo Translation Bot cd369396d9 [I18N] Update translation terms from Transifex 2016-06-19 02:59:13 +02:00
Jeremy Kersten fc22b549b1 [FIX] website_quote: fix report Price
l is not defined, it is line.

Bug introduced with commit odoo/odoo@5f5f8d8.

But it was never detected before because there was
no value for b2b/b2C before commit odoo/odoo@e6184aeb37
so total/subtotal in report was never print.
2016-06-18 01:56:04 +02:00
Jeremy Kersten e6184aeb37 [FIX] sale: set B2B as default mode at installation
Before this fix, you was in an 'unknow' mode before to have selected the mode
in the sale res config after the install of sale.

Side effect:
    Empty value in ecommerce
    Missing column subtotal in 'sale.order' and related report

Now, with fix, mode B2B is set by default (was the only mode in old version)
Using same behavior that the method execute of class resConfigSetting.

Usability: set the default option as the first choice in the res config.
2016-06-18 00:12:44 +02:00
Fabien Pinckaers ad858bf746 [FIX] hr_contract: broken icon
[IMP] hr_expense:
    invert placeholders: trip is a report, lunch is an expense
    total column in latest column
    no default value for expense description
2016-06-17 13:20:59 -07:00
Fabien Pinckaers f1ab3face1 [IMP] im_livechat: "website live chat" menu renamed to "Live Chat" 2016-06-17 10:39:15 -07:00
Xavier ALT f02b23006b [FIX] fields: during an onchange(), do not invalidate *2many fields because of their domain
Our usage of domain on fields One2many seems to trigger an obscure behaviour on
onchange.

With the following (simplified) config:

    Message(models.Model):
        _name = 'test_new_api.message'
        important = fields.Boolean('Important')

    Discussion(models.Model):
        _name = 'test_new_api.discussion'
        name = fields.Char('Name')
        important_emails = fields.One2Many('test_new_api.emailmessage', 'discussion',
                                           domain=[('important', '=', True)])

    Email(models.Model):
        _name = 'test_new_api.emailmessage'
        _inherits = {'test_new_api.message': 'message'}

        discussion = fields.Many2one('test_new_api.discussion', 'Discussion')
        message = fields.Many2one('test_new_api.message', 'Message')

Steps:
- We change 'name' on discussion, triggers an `onchange()` call
- we ends up filling cache on virtual record (on secondary fields, we calling
  record.mapped('important_emails.important'))
- we get a cache miss ('important' field not provided, only 'important_emails' ids,
  i.e with no change on existing records)
- we fill the cache, this mark 'important' field as modified
- because of commit 5676d81 and because 'important' is that case is a related (i.e
  computed) field we triggers cache recomputation
- as there is no way to recompute 'important_emails' for virtual record (no real
  ID) we ends up with empty 'important_emails' generating removal of existing records.

=> Finally changing any value for 'test_new_api.discussion' that trigger an onchange
will always reset 'important_emails' to empty

Fixed by Raphael Collet <rco@odoo.com>, and test by Xavier Alt <xal@odoo.com>.
2016-06-17 17:50:25 +02:00
Jeremy Kersten 39a7ce44b0 [FIX] tools: don't save dev_mode in config file.
When user reset master password from web database manager, the
config file is saved.

If server was started in dev_mode the param dev_mode was saved
in openerp_serverrc silently. (in 9 or always in trunk)

Remind: --dev_mode should be never used on a production server.
2016-06-17 17:19:00 +02:00
William Moreno 3e4adb1582 [IMP] fix typo
Closes #12466
2016-06-17 15:30:53 +02:00
jeffery chen fan bcb191f273 [FIX] crm_profiling: backport of cf9230d1ff
Do not redefine the view arch but do a proper inherit.
It was a problem as the redefinition removed some fields (headers,..).
It was also a problem if crm_profiling was uninstalled as the redefinition was
not removed.

Closes #12454
2016-06-17 15:19:39 +02:00
Jeremy Kersten 3834a89482 [IMP] website_sale: B2B-B2C - display price with or without taxes.
Allow to display price on the website tax included or not.

Price for product is computed with a new function display_price
which one compute an estimated price based on taxex and fiscal
position of the current partner for the current product.

Once the product is in the cart, it is the behaviour of previous commit
odoo/odoo@5f5f8d8 which is used to diplay price with or without taxes.
2016-06-17 15:14:28 +02:00
Nicolas Lempereur e1deae7eab [IMP] base: allow 'render' override with new api
New API use a frozendict for context, so when a function in the call
chain is overrided by new API (eg: render function of ir.qweb) the code
now changed by this commit would cause an error.

Instead this code duplicate the context frozendict as a dict removing
the need to set back the intial language in the context.

opw-681167

note: no need for >=saas-11
2016-06-17 15:11:06 +02:00
Jeremy Kersten 5f5f8d8efe [IMP] sale: allow to show total of order line tax inc or based on unit price.
Allow to set in configuration mode b2b or b2c.
Change the column of order line in sale view and in reports depending of sale.

Fix price_reduce field (wrong if tax was included in price)
and merge with code discounted_price from website_sale.

Change header from reports "Price Tax Excluded' by 'Price' in report.
That is wrong, sometime the amount can haxe tax included in the price.
2016-06-17 15:06:04 +02:00
qdp-odoo ba49172929 [FIX] account: on ir_sequence, number_next_actual must always be read instead of number_next which might contain wrong value in case of 'standard' sequence. This was causing a crash on creating a new invoice, if demo data were installed and the user went to settings\accounting to do some modification. Issue #12471 2016-06-17 14:41:12 +02:00
Géry Debongnie 5d78ace63c [MERGE] web: various small refactorings
Some cleanups, to prepare the future.
2016-06-17 13:54:36 +02:00
Géry Debongnie 77e20f57d2 [FIX] web: prevent some rpcs in tests
each time a js test is run, it used to start the chat manager, which
does a rpc.  This simply prevent the chat manager to start.
2016-06-17 13:32:38 +02:00
Géry Debongnie 00120a9271 [REF] web: refactor and simplify web.core 2016-06-17 13:32:37 +02:00
Géry Debongnie 2254abbde7 [REF] web: move Bus class to web.Bus 2016-06-17 13:32:37 +02:00
Géry Debongnie d56b35e26e [REF] web, *: move QWeb odoo init to web.QWeb
this js module centralizes all odoo initialization
2016-06-17 13:27:18 +02:00