Commit Graph
3175 Commits
Author SHA1 Message Date
Olivier Colson 40430699df [IMP] base: res.partner.bank : always display "account holder name" field
[IMP] account: partner form view: add a small link under the bank accounts list, allowing to open the tree view of the linked res.partner.bank, so that they can be fully edited

Before that, as the bank_ids field of res.partner is displayed as an editable tree view with only two columns, it was impossible to edit more specific fields of the bank accounts through the partner form view, such as acc_holder_name.
2018-08-27 15:30:19 +02:00
Christophe Simonis a7a30791de [MERGE] forward port branch saas-11.4 up to a5187cef10 2018-08-27 11:16:44 +02:00
Lucas Perais (lpe) 7768abd40b [FIX] tools:image: reset stream on crop
When cropping the image with a size, we crop it first and then we make a thumbnail out of it

Before this commit, the same byte stream was used, meaning that the thumbnail was
appended to the original

After this commit, we reset the stream

OPW 1876496
closes #26575
2018-08-27 10:31:43 +02:00
Odoo Translation Bot f0ccdcb209 [I18N] Update translation terms from Transifex 2018-08-26 07:07:10 +02:00
Odoo Translation Bot 7526b64e8a [I18N] Update translation terms from Transifex 2018-08-26 04:10:40 +02:00
Odoo Translation Bot 0da9da4c44 [I18N] Update translation terms from Transifex 2018-08-26 02:17:37 +02:00
Odoo Translation Bot 42e41b191c [I18N] Update translation terms from Transifex 2018-08-26 00:27:45 +02:00
Christophe Simonis 9f99eb9cb0 [MERGE] forward port branch saas-11.3 up to 3be46428cc 2018-08-24 22:12:20 +02:00
Christophe Simonis 3be46428cc [MERGE] forward port branch 11.0 up to 302ad0632c 2018-08-24 21:12:27 +02:00
Christophe Simonis 302ad0632c [FIX] base: set filename of javascript files of assets
A side effect of this bug was that other bugs like [1] wasn't caught by
the test suite.

[1] 2ed13c583e
2018-08-24 21:07:09 +02:00
Sébastien Theys 1addade28b [FIX] base: correctly detect when admin logs in
Since 2f7c03d9ca it's not possible to log in as user 1.

However, we reset the base url when the admin logs in, which is now user 2.

This fixes wkhtml2pdf was not able to load css file, and probably some other side effects.

PR: none
Task: 1879620
2018-08-24 15:55:46 +02:00
Odoo Translation Bot b8c6c24bbb [I18N] Update translation terms from Transifex 2018-08-24 15:54:45 +02:00
Odoo Translation Bot 10c9f07286 [I18N] Update translation terms from Transifex 2018-08-24 15:22:47 +02:00
Martin Trigaux a183a5125a [I18N] export saas-11.5 source terms
Create the odoo-12 project
2018-08-24 14:34:57 +02:00
Raphael Collet 2f8b12f94b [FIX] base: put email on the right record 2018-08-24 13:39:45 +02:00
Yannick Tivisse 89130b51b4 [FIX] base: Set a default email address for admin
Purpose
=======

Currently, as the admin as no email address, it's now impossible to install
the mail module without demo data, because of the following data:

        <record model="mail.message" id="module_install_notification" context="{'mail_notify_noemail': True}">
            <field name="model">mail.channel</field>
            <field name="res_id" ref="mail.channel_all_employees"/>
            <field name="message_type">email</field>
            <field name="subtype_id" ref="mail.mt_comment"/>
            <field name="subject">Welcome to Odoo!</field>
            <field name="body"><![CDATA[<p>Welcome to the #general channel.</p>
            <p>This channel is accessible to all users to <b>easily share company information</b>.</p>]]></field>
        </record>

Because when creating a mail.message a user error is raised if no email address is found.

    @api.model
    def _get_default_from(self):
        if self.env.user.email:
            return formataddr((self.env.user.name, self.env.user.email))
        raise UserError(_("Unable to post message, please configure the sender's email address."))

In a general way, all the users should have an email address.
2018-08-24 11:58:26 +02:00
Yannick Tivisse 265263dbce [FIX] base: Set a default email address for admin
Purpose
=======

Currently, as the admin as no email address, it's now impossible to install
the mail module without demo data, because of the following data:

        <record model="mail.message" id="module_install_notification" context="{'mail_notify_noemail': True}">
            <field name="model">mail.channel</field>
            <field name="res_id" ref="mail.channel_all_employees"/>
            <field name="message_type">email</field>
            <field name="subtype_id" ref="mail.mt_comment"/>
            <field name="subject">Welcome to Odoo!</field>
            <field name="body"><![CDATA[<p>Welcome to the #general channel.</p>
            <p>This channel is accessible to all users to <b>easily share company information</b>.</p>]]></field>
        </record>

Because when creating a mail.message a user error is raised if no email address is found.

    @api.model
    def _get_default_from(self):
        if self.env.user.email:
            return formataddr((self.env.user.name, self.env.user.email))
        raise UserError(_("Unable to post message, please configure the sender's email address."))

In a general way, all the users should have an email address.
2018-08-24 11:05:22 +02:00
Raphael Collet d72ca98593 [FIX] odoo: db manager configures user_admin 2018-08-24 11:03:24 +02:00
Christophe Simonis 3a95d2fdf8 [FIX] base: force comparison between strings
When using another login method than stored password (ldpa,i oauth...),
user's password is NULL in database. Passlib < 1.7 expect the encrypted
password to be a string, leading to an uncaught traceback, forbidding
login.
2018-08-24 10:58:18 +02:00
Jeremy Kersten 0cdfc84be8 [FIX] base: fix authentication, wrong login/password raise an error 500
During rebase of 4f6ec1c, we remove accidently a part of aac21e4.
Side effect is that uid was False but success_login True.

Courtesy of @xmo-odoo for help
2018-08-24 09:21:46 +02:00
Christophe Monniez f00f4f3852 [REL] saas-11.5 2018-08-24 08:10:38 +02:00
Raphael Collet 2f7c03d9ca [IMP] base: add regular user admin as uid 2
User 1 simply becomes a technical user (inactive, no password).
2018-08-23 21:38:57 +02:00
Raphael Collet 7ba9acea18 [FIX] fields: context on Many2many field 2018-08-23 21:38:57 +02:00
Christophe Simonis 6fd68c28cd [FIX] core: use actual chrome/chromium executable on macOs. 2018-08-23 16:37:17 +02:00
Raphael Collet 3ea11e6e6f [IMP] server: flag thread as testing when test-file runs 2018-08-23 15:21:06 +02:00
Toufik Benjaa 61d790d6e2 [FIX] base: avoid crash when acessing image without access_token
- When accessing an image from an "ir.attachment" which doesn't have an
  access_token, the code crashes if you provide the argument access_token
  on the URL.

  This is due to a comparison between a boolean and a string using the
  consteq function.
2018-08-23 15:20:24 +02:00
Christophe Monniez 334804347a [FIX] tests: increase browser_js ready code timeout
Before starting a JS test/tour the _wait_ready method evaluates if the
test is ready with a timeout of 10 sec. From times to times, it happens
that the page is not ready after this timeout but the problem is hidden.

In order to help fixing that kind of issue, the timeout is increased to
60 sec and a warning is logged to emphasis the fact that an
issue exists.

Also some unused imports are removed with this commit
2018-08-22 16:17:38 +02:00
Christophe Simonis 4f62d6dd8f [MERGE] forward port branch saas-11.4 up to ef6b574eda 2018-08-22 12:02:30 +02:00
Jeremy Kersten 1cfaa12012 [IMP] server: --test-enable support tests directory without import
Before this commit, if import from tests directory was not in the __init__ file,
it was not possible to launch it with --test-file cli.

Now we only check in test directory if file exists.

This commit closes #26500
2018-08-22 10:08:30 +02:00
Christophe Simonis ef6b574eda [MERGE] forward port branch saas-11.3 up to 6cc7d3f945 2018-08-21 18:48:13 +02:00
Christophe Simonis 70d0148d0d [MERGE] forward port branch 11.0 up to fbfb91799e 2018-08-21 16:58:17 +02:00
XavierDo 2831fa7926 [IMP] core, test_mail: improve query count assertions
-remove margin
With the spirit of making tests determinists,
we can remove margins to have a real test of query count.

-mock random on assert query count
bus gc is triggered using random. Therefore, when send_many is called,
we have 1% chance to have more query. Mocking random.random to 1
will disable gc during query count tests (not during warmup).
Could be interresting to put gc collection in a cron latter

-add more info on querycount
Adding file and line number on query count failure/info will help to update
the query counts.

-update query count based on enterprise
Update all query count with enterprise values (exactly)

-normalize query counts with enterprise
voip module add a read on activity type (during create) in enterprise,
leading to one more query but also more information in cache.
Therefore, the next assertion will need one more query to access this data
in community.
Adding an access to activity type in the first assertion will allow
to have the same cache state in community and enterprise.

Task: #1878588
PR: #26476
2018-08-21 16:56:54 +02:00
Christophe Simonis fbfb91799e [MERGE] forward port branch saas-15 up to 9cf0dbe226 2018-08-21 16:00:40 +02:00
Christophe Simonis c619b19f66 Revert "[FIX] manual creation of serialized field from the interface"
Non applicable since b0646f9d2c.

This reverts commit 03395ea103.
2018-08-21 14:13:15 +02:00
Christophe Simonis e80f853ab3 [MERGE] forward port branch saas-14 up to aafa6e38c4 2018-08-21 12:06:23 +02:00
Christophe Simonis aafa6e38c4 [MERGE] forward port branch 10.0 up to 342d037373 2018-08-21 11:33:53 +02:00
Nicolas Martinelli 07b5f205ab [FIX] models: unlink ir.property
On a new DB with demo data, as Demo User:
- Create a partner
- Unlink the partner

An `AccessError` is raised.

The error is raised on `ir.property`, for the field
`property_product_pricelist`. An entry was indeed automatically created
at partner creation. However, a regular user is not allowed to delete an
`ir.property`.

The property can be safely deleted as SUPERUSER as long as the proper
unlink access rights have been tested beforehand.

opw-1870737
2018-08-21 09:32:01 +02:00
Raphael Collet b1cc28be00 [FIX] tests: clean up code
Closes #26467
2018-08-21 09:21:11 +02:00
Akram Ben Aissi cae7c71635 [IMP] cli: allows to run odoo with openshift
For containers using random uids[1], use the higher level method getpass.getuser
which as the same effect but also looks consider the environment variables to
determine the user name.

Details from
http://blog.dscpl.com.au/2015/12/unknown-user-when-running-docker.html

CLA signature for akram

Closes #26452

[1] openshift or docker as explained at
http://blog.dscpl.com.au/2015/12/random-user-ids-when-running-docker.html
2018-08-21 08:34:14 +02:00
Florent de Labarre c181033a6d [IMP] tools: replace SQL code
No need to construct the table name, can use the model name

Closes #25659
2018-08-20 16:58:38 +02:00
Benoit 03395ea103 [FIX] manual creation of serialized field from the interface 2018-08-20 13:56:29 +02:00
qsm-odoo ece1e3d93f [FIX] *: BS4, restore right-aligned columns
With BS3, if a column was supposed to be aligned on the right, using
the 'pull-right' class on it did the trick.

With BS4, this is not the case anymore as .row elements use flex.
This commit use one of those 3 solutions case per case:

- If the column was alone on its row, then adding the
  'justify-content-end' class on the row.

- If the column was not alone on its row, then adding the 'ml-auto'
  class on the column instead.

- If the column was already filling the row, there was no point in
  aligning it to the right

Note: this commit does not case about potential xpath which would add
new columns in one of those rows. If any, this can be handled as a fix
later.
2018-08-19 16:57:14 +02:00
Odoo Translation Bot 132d9ad18b [I18N] Update translation terms from Transifex 2018-08-19 07:14:31 +02:00
Odoo Translation Bot a7dd10a838 [I18N] Update translation terms from Transifex 2018-08-19 04:12:48 +02:00
Odoo Translation Bot afffcc971f [I18N] Update translation terms from Transifex 2018-08-19 00:28:25 +02:00
Dharmraj JhalaandMohammed Shekha a105e5f208 [IMP] web,various: Add 'Remove' button to view dialogs opened from x2m fields
Currently, to remove link of x2m field from any record, sometimes there's no way.
For example, if we are on mobile and open any Quotation, it's linked quotation lines
are automatically converted in kanban, and there is no way to delete a line from
that quotation. However, in some of the manually designed kanban, there is special 'x'
for removing / unlinking x2m record, for example, Contacts of Partner.

This commit makes the behavior more consistent. During edition (mobile and desktop), if
a view dialog is opened on click of x2m field, it will have one 'Remove' button (based
on user rights) on right side of dialog footer, allowing users to delete / unlink the
record. Moreover, in mobile, the modal is opened fullscreen, with sticky header and
footer.

Related Task# : 31641
Closes PR #15857

Co-authored-by: Mohammed Shekha <msh@openerp.com>
2018-08-17 18:18:53 +02:00
Laurent Smet 380f1c09ce [ADD] account_facturx: add import/export invoice using the Factur-x standard
Factur-x is the e-invoicing standard in vigor in FR & DE and, by extension, it will probably become the standard in Europe. Thus this will be used as default e-invoicing standard by Odoo.

The idea is simple:
  * when printing your customer invoice report (not in draft ofc), a Factur-x xml file is generated and embedded inside the PDF.
  * when importing supplier bills in the form of PDF files, we detect if any Factur-x xml file is attached and complete the data of the draft vendor bill accordingly. This is done during the message_post() function.

/!\ To be compliant with the Factur-x standard, the PDF should be PDF/A-3b compliant. (See: http://fnfe-mpe.org/wp-content/uploads/2018/07/1.-FACTUR-X-V1.1-2018-07-24-FR.pdf chapter 6)
    However, wkhtmltopdf is not PDF/A compliant and then, the generated PDF report are not fully compliant with the Factur-x standard.

Was task: 1859277
Was PR #25508
2018-08-17 17:35:39 +02:00
Fabien Pinckaers 11b24b42d3 [IMP] base: UX of partner creation with ro address 2018-08-17 16:25:32 +02:00
Martin Trigaux d2fd2f2083 [IMP] base: avoid creating new module
The field module_id is only informative

Fixes #25705

Courtesy of Swapnesh Shah and Pedro M. Baeza
2018-08-17 15:54:41 +02:00
Christophe Monniez c6fa1796af [FIX] tests: clean the browser even on failure
When a Chrome headless test fails the browser is not cleaned and could
lead to a mix with other tests when the same method is called.

Also, the multiline assertions gives an unreadable message when the
assertion fails.
Finally, it happens that a thread does not have an 'url' attribute and lead to a crash when the logger tries to show the thread url.

With this commit, the browser is cleaned, even on failure and the
assertions are now one line.

Closes:  #26432
2018-08-17 14:49:53 +02:00