Purpose of the commit is to ensure parent and child partners have the
same company. When creating a new child in another company and one of them
tries to log a message on other contacts an error is raised due to
multi company record rules.
It makes no sense to have child contacts belonging to separate companies.
If parent is set on contact then the company_id should be readonly and
it will automatically set the parent's company_id.
Task-1934813
closes: #32405
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
Send SMS from server/automated actions. Indeed we can already send emails from
server actions. The goal is to have the same thing for the sms.
SPECIFICATION
Purpose of this commit is to add support of sending batch SMS through
server actions. This means sending SMS will be available also for
automated (base automation) and scheduled actions (cron).
A new type of server action is added: sms. User choose an sms.template
to use to send SMS in batch. An option allow to choose to keep archive on
selected records. If no archive is kept, a batch of sms is created. With
archive a _message_sms is performed with note subtype, allowing to have
a discuss messages with only sms customer being notified.
Linked to task 1935280
Part of PR #34864
Using api.constrains should be used instead
Simply leave a warning in case a model uses a non-empty attribute
`_constraints`.
closesodoo/odoo#34679
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
1/ web: adapt formatDate to handle NaN values
DashboardRenderer might return NaN for `Date` or `DateTime` fields if
their original value is null or incorrect.
2/ hr: add job_title in demo data
3/ hr_recruitment: link employee in the chatter for new recruits
4/ hr: remove employee documents in the model
5/ hr_attendance: improve resiliency of relative_time
6/ hr: display manager on res_users
7/ hr: change Address Book to Employee Directory
TaskID: 2009111
closesodoo/odoo#34180
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
The activation of languages was changed at bd3a553ad9
This commit makes a few changes/fixes
- When executing the toggle_active method do not open the wizard but load
directly the language
- Rename the name of the button in tree view, Download was confusing as implies
the resources are downloaded while it is only loaded
- Remove duplicated help
- Add action button to load the language from the form view (as it the only way
from the form view was using the "Unarchive" action)
- Add label directly next to the field (was making a line return)
- Set the placeholder on the field (no effect on the label)
- Remove groups as the view is already restricted to system users
Follow-up of task id 2026150
closesodoo/odoo#34940
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Multi is the default api for methods, it is not necessary to explicitly
decorate methods with it, adds clutter and most people use it because
they see that the rest of the code uses it.
Done with `find . -type f -name '*.py' | xargs sed -i '/@api.multi/d'`
1. base: Load translation when language is activated
Purpose
------
Settings > Translations > Languages > I find the language I want
and I click on stat button to activate it.
Now I set it up on my user, it still doesn't work > the langage has not been loaded !!!
Specification
-------
When activating a language load the translation (and open the load translation wizard)
2. base: Add shortcut button to load language
Pupose
-------
On the res.partner and res.user form view if you want to change
the language, it's not easy to know where I can activate more
langages.
Specification
-----------
Add a small icon next to the language field to activate more
languages (similar interface than to send an SMS).
3. base: Clean res.lang tree view
1. Set limit to 200 to display all current 82 languages
in one page (current limit is 80/82).
2. Move some fields to debug mode.
3. Add a button to directly load a language.
4. base: Remove Load a Translation menu
Activating a language automatically load the translation,
hence the menu is no longer necessary.
5. base: Don't show language if only one active
If only one language is active, don't show in the contact
form view (`res.partner`) the language field. Changing the language is
not possible since there is only one language.
Hence the field is useless and therefore hidden.
TaskID: 2026150
closesodoo/odoo#34661
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
If only one language is active, don't show in the contact
form view (`res.partner`) the language field. Changing the language is
not possible since there is only one language.
Hence the field is useless and therefore hidden.
1. Set limit to 200 to display all current 82 languages
in one page (current limit is 80/82).
2. Move some fields to debug mode.
3. Add a button to directly load a language.
Pupose
======
On the res.partner and res.user form view if you want to change
the language, it's not easy to know where I can activate more
langages.
Specification
=============
Add a small icon next to the language field to activate more
languages (similar interface than to send an SMS).
Purpose
=======
Settings > Translations > Languages > I find the language I want
and I click on stat button to activate it.
Now I set it up on my user, it still doesn't work > the langage has not been loaded !!!
Specification
=============
When activating a language load the translation (and open the load translation wizard)
Purpose
=======
Some formviews are useless since there are so few relevant fields https://nimb.ws/1EdMV7
For instance, to create a new lost reason the user is forced to:
1. Hit create
2. Type in the name of the record
3. Hit save
4. Go back to the treeview
While he could simply type them away in an editable treeview.
The goal of this task is to allow for creation/edition of records in such models
directly from the treeview.
Specification
=============
Modify tree views from a given list of models for which the
treeview has to be made editable bottom.
If not specified otherwise, the content treeview should stay the same.
If a field is readonly/required/etc. in the formview, it should be in the
editable treeview as well.
Relabeling has to be done of the field itself, not in the view.
TaskID: 2026126
closesodoo/odoo#34577
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
The ready code warning timeout of 2 seconds can be confusing since
it is triggered just after the 2 seconds. We can log this message
at the end in order to give the real timeout.
In JS tests, when the ready code takes too much time, a warning is
logged. As a consequence, the runbot updates the github status as a
failure, causing real pain to people who simply wants to merge their
features.
With this commit the warning is changed into an info and the runbot will
be happy.
closesodoo/odoo#34865
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Future runbot improvement may share sources between build,
meaning that sources will be readonly to avoid any interaction.
_touch() was supposed to handle ro filesystem but
f7130556 introduced a new test that was not working
in this case.
Instead of trying to touch file and pseudomocking the result
if the filesystem is readonly, this commit add a real patch
on getmtime.
cherry-pick of b295723c99closesodoo/odoo#34823
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Future runbot improvement may share sources between build,
meaning that sources will be readonly to avoid any interaction.
_touch() was supposed to handle ro filesystem but
f7130556 introduced a new test that was not working
in this case.
Instead of trying to touch file and pseudomocking the result
if the filesystem is readonly, this commit add a real patch
on getmtime.
cherry pick of b295723c99closesodoo/odoo#34815
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
We add two warnings to make the --test-file argument more user friendly:
- one when the test file does not exist
example:
./odoo-bin -d master --test-file ./addonss/stock/tests/test_quant.py
before:
INFO master odoo.service.server: loading test file ./addonss/stock/tests/test_quant.py
after:
WARNING master odoo.service.server: test file ./addonss/stock/tests/test_quant.py cannot be found
- one when the test file is not a python file
In both cases, nothing was being tested but the server did not say why.
closesodoo/odoo#34808
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Add the support to be able to specify exlicitely module, class and method name in test_tags
Before this commit, there is no distinction between module tag and test tag. Meaning
that --test-tag module_name will replace the default +standard tag and execute all test
of the module.
This commit tries to keep the initial behaviour, while addind new features, like explicit
modules tag with /module_name, as well as class (:class) and method (.method)
Some usage examples:
--test_tags /module will execute all standard test of module
--test_tags :class will execute all standard test with class name 'class'
--test_tags .method will execute all standard test with method name 'method'
--test_tags external/module will execute all external test of module
--test_tags */module will execute all tests of module,
--test_tags */module,-standard will execute all non standard tests of module,
--test_tags -/website:TestUiTranslate.test_admin_tour_rte_translator will disable only rte translator test
closesodoo/odoo#34756
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Purpose
=======
Currently when clicking on 'Archive' or 'Unarchive' on the list view,
we write directly on the record {'active': False}, instead of calling
toggle_active. Missing that way implementation of numerous business cases.
Example
- Archive a record --> archive its next activities
- (Un)Archive a user --> (Un)Archive its partner
- (Un)Archive a product variant --> (Un)Archive its template if
there is only one variant
- Archive an employee --> Open a wizard to choose an exit plan + describe
the departure reason
- Archive a route --> Archive its procurement rules
- ...
Specification
=============
- Call toggle_active instead of write when calling toggleActive in the web
client.
- On the other hand, use actionArchive and actionUnarchive to apply the
toggle action on the related records only.
Purpose
=======
While cleaning the stat buttons across all modules, we
decided to move the (un)archiving from stat button to
actions in the 'Action' dropdown.
Specification
=============
Remove the 'active' stat buttons in all views
Future runbot improvement may share sources between build,
meaning that sources will be readonly to avoid any interaction.
_touch() was supposed to handle ro filesystem but
f7130556 introduced a new test that was not working
in this case.
Instead of trying to touch file and pseudomocking the result
if the filesystem is readonly, this commit add a real patch
on getmtime.
cherry-pick of b295723c99closesodoo/odoo#34816
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Store the SQL constraint message directly in the field `message` of the
corresponding `ir.model.constraint` record, and manage translations from
there. Those records are given an XML id in order to be tracked in PO
files. The translation type 'sql_constraint` is removed.
Before this commit, action report had their model referenced only with a char field
which made impossible to elaborate domain based on the model
After this commit, a new computed field, depending on that char field allows to do that
OPW 2029699
The aforementioned commit prevented the creation of automatic xmlids for
custom fields, however this change is not exactly stable; if a database
already contains automatic xmlids for custom fields and the module to
which these xmlids belong to is upgraded, the xmlids would get deleted,
along with any records related to it because of the way that
`_update_xmlids` works.
This commit leaves existing automatic xmlids of custom fields while
preventing the creation of *new* ones.
closesodoo/odoo#34563
Signed-off-by: Christophe Simonis <chs@odoo.com>