Commit Graph
577 Commits
Author SHA1 Message Date
Mohammed Shekha 80a8b66246 [IMP] web: m2o/m2m SelectCreateDialog will now open kanban view
- many2one widget in mobile will open kanban view instead of listview when
records needs to be selected

- Add support of "kanban_view_ref" on many2x fields:
For many2one fields, this specific kanban view will be opened when you click
on this field. Note that in desktop, the behavior stay unchanged:
'Search More' will open the tree view.
For many2many fields, this specific kanban view will be opened when you add
a record in mobile.

- Add support "selection_mode" in kanban views.
This boolean is set to true when you want to use a kaban view to
select a record instead of open a record.
"selection_mode" is now passed in qweb_context to allow developers
to use t-if='selection_mode' in kanban views to show or hide elements;
buttons, dropdowns, anchor tags are not necessary when selection_mode
is enabled. So those elements can be hidden based on this condition.
Useful when kanban view is opened from m2o in mobile environment.

Task ID : 1924779
2019-08-09 09:01:19 +00:00
sri-odooandjat-odoo 369c20a99b [REF] web: refactor the calendar view
Improve design and introducing several usability improvements:
- Removed customization of an event card, just display event title.
- Added popover, popover consist of two sections:
    1) Show the title, date and time of an event. Date and time are
       automatically computed according to the user timing preferences,
       language and event duration. Can be hidden with hide_date/hide_time
       attribute respectively.
    2) Display all the fields specified inside the <calendar/> element.
       fields can be specified with a widget and its options.
       e.g. <field name="name" string="Custom Name" widget="char" options="{}"/>
- Show avatar in popover for filters.
- Removed hide sidebar feature.
- Increase readability using a better color selection.
- Better UI in mobile.

And, Adapted test cases

Task 1919926

Co-authored-by: jat-odoo <jat@openerp.com>
2019-08-07 12:30:55 +00:00
Mathieu Duckerts-Antoine d925a4557a [IMP] web: default groupbys can be given a rank
Consider an action with a search view defined by the arch

<search>
<filter name="gb_foo" context="{'group_by':'foo'}"/>
<filter name="gb_bar" context="{'group_by':'bar'}"/>
</search>

If the action context is

{
search_defaults_gb_foo: true,
search_defaults_gb_bar: true,
}

the two groupbys will be activated at start but not necessarily in a suitable
order.

This commit allows to specify the order in which the default groupbys should be
activated by giving them a rank. For example

{
search_defaults_gb_foo: 2,
search_defaults_gb_bar: 1,
}

leads to group first by bar then by foo.
The rank number should be chosen between 1 and 99.

closes odoo/odoo#35538

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-08-08 09:27:23 +00:00
mreficent 355a5dfc36 [IMP] *: fix typos in comments
closes odoo/odoo#35404

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-07 10:28:33 +00:00
Sébastien Theys 58a2ffa26f [IMP] *: rename image fields
image_original => image_1920 (now resized to 1920)
image_big => image_1024
image_large => image_256
image_medium => image_128
image_small  => image_64
image replaced by image_1920 (when writing) or by image_1024 (when displaying
	what was previously the big size)

+ add new intermediate format:
image_512

PR: #34925
2019-08-02 16:47:58 +00:00
Martin Trigaux 294a857f4f [IMP] doc: add reference to _lt method
Was added at odoo/odoo#31211

closes odoo/odoo#35393

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-02 06:57:01 +00:00
mreficent 64773140b0 [IMP] doc: remove calls to @api.guess and @api.noguess
Those two decorators are removed/deprecated since recent commits but
some references remained in the documentation.

api.guess and api.noguess is deprecated and removed since c552fb7a61

closes odoo/odoo#35332

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-01 13:16:37 +00:00
Yenthe666 ce00210b61 [IMP] doc: remove calls to @api.multi and @api.one
Those two decorators are removed/deprecated since recent commits but some references remained in the documentation.

api.multi is deprecated since https://github.com/odoo/odoo/commit/cc62447a44c2cf4e2edaf8a1f6d94520e799ddd9
api.one was removed with https://github.com/odoo/odoo/commit/407f1f6cdb87a59bbad9f853078d7345cdf9f60c

closes odoo/odoo#35261

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-30 15:39:19 +00:00
Xavier Morel e4b75149f7 [REM] doc: js apidoc
Breaks doc-building all the time, more advanced ES6 features are not
supported by the JS parsing library.

closes odoo/odoo#35288

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-07-30 09:30:52 +00:00
Xavier Morel 2ad764b5ea [FIX] doc: rST warning
rST wants an empty line after a list.
2019-07-30 09:30:05 +00:00
Xavier Morel 38b919251e [REM] doc: autodoc of removed api.* decorators
* @one was removed in 407f1f6cdb
* @v7 and @v8 were removed in c552fb7a61
* @multi was removed in a8767716cf
2019-07-30 09:29:28 +00:00
Christophe Simonis d5e1fd16b4 [MERGE] forward port branch saas-12.4 up to cda4f3c308 2019-07-29 14:10:30 +02:00
Christophe Simonis bfd34e14b1 [MERGE] forward port branch saas-12.3 up to 40e8b67179 2019-07-26 15:12:29 +02:00
Géry Debongnie 7d78795f8b [FIX] web: properly handle (grouped list) pager
when last field is numeric

closes odoo/odoo#35176

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-07-25 12:23:51 +00:00
Julien Mougenot 5c34091361 [FIX] web: improve editable list column widths
Changed the way some field types are displayed.

Before this commit, column width in a list were calculated according to
a given factor (integer), determining their weight.

Now, some specific fields have an hardcoded width instead. This task
also slightly tweaks some width factors, in order to try to have a
better layout in most list views

Task 1985916

closes odoo/odoo#35147

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-07-24 14:05:02 +00:00
Martin Trigaux a98427834e [MERGE] Forward port of saas-12.2 to saas-12.3 up to 860ab5a1c2
closes odoo/odoo#35119

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-24 10:32:23 +00:00
Géry Debongnie 4e6ee3ac97 [FIX] web: allow groupby buttons in list view at any level
The initial implementation of the special group by buttons in list
groups only supported the first level of groupby.  So, if one grouped a
list view by field A, it worked (if A had a groupby defined).  However,
if we want to group by B/A, this no longer works.

opw 2040725

closes odoo/odoo#35090

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-07-23 08:09:50 +00:00
Martin Trigaux e266c7c98a [MERGE] Forward port of 12.0 to saas-12.2 up to 5e4c1b3701 2019-07-23 13:41:00 +02:00
Martin Trigaux 324d3fc93a [MERGE] Forward port of saas-11.3 to 12.0 up to 06f8f04699
closes odoo/odoo#35064

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-22 11:43:54 +00:00
Martin Trigaux 06f8f04699 [MERGE] Forward port of 11.0 to saas-11.3 up to eb4700f17f
closes odoo/odoo#35054

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-22 09:47:11 +00:00
Dhawal Limbuwala 1ae356146c [IMP] doc: add some documentation of the attributes operation
closes odoo/odoo#20818

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-07-18 06:59:42 +00:00
Laurent Smet beaa30a3d1 [IMP/REF] accounting-pocalypse yeaaahh
This commit merges the following models
 * account.invoice and account.move
 * account.invoice.line and account.move.line
 * account.voucher and account.move
 * account.voucher.line and account.move.line

It was the opportunity for a big cleanup of the code, so it also restructures the whole account module, its different models/fields, the tests etc. for a better world and a better code readability.

==== Rationale ====
The rationale of this huge change is that we want journal entries / invoices to be easily edited, and changes reflected in the other model. It's a HUGE feature and very strategic for the fiduciary companies. For example, changing the account of a journal entry needs to be automatically reflected on the related invoice.

The same reasoning applies to sale/purchase vouchers.

==== Changes made in features =====
When creating an invoice, you are now creating a journal entry directly.
--> The object account.invoice no longer exists.
In the same fashion when creating an invoice line, you're now adding journal items directly in the journal entry representing the invoice. If this invoice line has some tax, it may create additional journal items as well.
--> The models account.invoice.line & account.invoice.tax no longer exist

Identically, when creating a sale/purchase receipt with its lines, you are now creating a journal entry directly and there's no more usability difference between encoding a receipt or an invoice.
--> The object account.voucher no longer exists.
--> The object account.voucher.line no longer exists.
--> The whole account_voucher module no longer exists.

Positive side-effects coming from these changes are
* draft invoices/bills/sale or purchase receipts now create a draft accounting entry. Validate these objects now simply post its journal entry. That means that draft invoices/bills/sale or purchase receipt can straightforwardly be included in reporting or budgets.
* opening a journal entry in form view will now always open the correct view: if it's a sale/purchase journal entry we will have a customer invoice/vendor bill view or a sale/purchase receipt view, whatever the menu we're coming from.
* code & business logic simplification. It is also condensed in a single place instead of being partially duplicated on invoices, vouchers and journal entries.

There should be no feature loss, except the one allowing to group multiple journal items together based on the same product during the invoice validation.

==== Changes made in models =====
* account.invoice: model removed. Instead, now use account.move with following mapping

field (account.invoice) 		field (account.move)
-----------------------			--------------------
name 					invoice_payment_ref
number 					name
reference 				ref
comment 				narration
user_id 				invoice_user_id
amount_					total_company_signed amount_total_signed
residual 				amount_residual
state 					state + invoice_payment_state 		/!\ selection changed
date_invoice 				invoice_date
date_due 				invoice_date_due
sent 					invoice_sent
origin 					invoice_origin
payment_term_id 			invoice_payment_term_id
partner_bank_id 			invoice_partner_bank_id
incoterm_id 				invoice_incoterm_id
vendor_bill_id 				invoice_vendor_bill_id
source_email 				invoice_source_email
vendor_display_name 			invoice_vendor_display_name
invoice_icon 				invoice_vendor_icon
cash_rounding_id 			invoice_cash_rounding_id
sequence_number_next 			invoice_sequence_number_next
sequence_number_next_prefix 		invoice_sequence_number_next_prefix

'invoices' subset of account.move can be accessed by using the selection field 'type' or one of the many helpers like is_invoice()

* account.move: now has a valid state 'cancel' that has to be excluded from all business logic
* account.move: field 'amount' renamed into 'amount_total'
* account.move: field 'reverse_entry_id' renamed into 'reversed_entry_id'
* account.move.line: now has a field 'display_type' that has to be excluded from all business logic, in order to support invoice layouting
* account.invoice.line: model removed. Instead, now use account.move.line with following mapping

field (account.invoice.line) 		field (account.move.line)
----------------------------		-------------------------
invoice_id 				move_id
uom_id 					product_uom_id
invoice_line_tax_ids 			tax_ids
account_analytic_id 			analytic_account_id

'invoice lines' subset of all account.move.line from a journal entry can be accessed by using the boolean field 'exclude_from_invoice_tab'

* account.invoice.tax: model removed. Instead, now use account.move.line with following mapping

field (account.invoice.tax) 		field (account.move.line)
---------------------------		-------------------------
invoice_id 				move_id
account_analytic_id 			analytic_account_id
amount 					price_unit
base 					tax_base_amount

'tax lines' subset of all account.move.line from a journal entry can be accessed by using the relational field 'tax_line_id'

* account.invoice.confirm: model removed. Instead, now use the 'post()' function of account.move
* account.invoice.refund: model removed. Instead, now use account.move.reversal to reverse the entries with the same options as we had for invoices
* account.voucher: model removed. Instead, now use account.move of type in ['out_receipt', 'in_receipt]
* account.voucher.line: model removed. Instead, now use account.move.line

==== Changes made in functions ====
* on account.move, method _run_post_draft_to_post() renamed into _autopost_draft_entries()
* on account.move, method action_account_invoice_payment() renamed into action_invoice_register_payment()
* on account.move, method action_invoice_reconcile_to_check() renamed into action_open_matching_suspense_moves()
* on account.move, method _get_domain_edition_mode_available() renamed into _get_domain_matching_supsense_moves()
* on account.move, method _get_intrastat_country_id() renamed into _get_invoice_intrastat_country_id()
* on account.move.line, method _get_domain_for_edition_mode() renamed into _get_suspense_moves_domain()
* in account.bank.statement, contextual key 'edition_mode' renamed into 'suspense_moves_mode'

Was task 1917430
2019-06-28 11:52:55 +00:00
Christophe Monniez 0dc4a63e2d [IMP] tests: save screenshots and screencasts in temp
Actually, when a browser_js test is running, screencasts and screenshots
are saved only if a "--logfile" parameter is specified.

This is problematic with the runbot because '--logfile' arg is not
provided when running tests.  Also, in most situations, developpers
prefer to have logs on stdout.

With this commit, two CLI args are added to specify screencasts and
screenshots directories. If no screenshots dir is provided, it defaults
to "{tmp_dir}/odoo_tests/{db_name}/screenshots".

It means that screenshots are always enabled during browser_js tests.

If screencasts arg is given, it enables screencasts and save them in
"DIR/{db_name}/screencasts". If the screencasts parameter is "1", DIR
will be the same as for screenshots.

The ffmpeg tools is used to encode frames into a video. If the ffmpeg
tool is not found on the system, the frames are kept as pngs files
instead.

closes odoo/odoo#34640

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2019-07-19 12:14:36 +00:00
Lucas Perais (lpe)andAaron Bohy dd7022eccd [IMP] base,web*: searchpanel in all multi record views
Before this rev. the searchpanel could only be activated in kanban
views (and it was specified in the kanban arch). From now on, the
searchpanel can be activated in any multi record view. It's arch
is moved to the search view arch (inside the <searchpanel> tag).

Task 1985921

Co-authored-by: Aaron Bohy <aab@odoo.com>
2019-07-19 08:39:07 +00:00
Jigar Patel cda93a5c19 [IMP] web: add new date range picker field widget
Adds a new widget to support start & end date or datetime.

closes odoo/odoo#33266

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-07-18 12:13:34 +00:00
Adrian Torres 4b38cc6590 [REM] *: calls to @api.multi
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'`
2019-07-17 14:13:12 +02:00
Lucas Lefèvre 4f47b729b1 [IMP] base: Remove Load a Translation menu
Activating a language automatically load the translation,
hence the menu is no longer necessary.
2019-07-16 17:28:52 +02:00
Raphael Collet c552fb7a61 [IMP] api: remove deprecated decorators 2019-07-08 13:51:35 +00:00
Aaron Bohy a798daa4e7 [DOC] qweb: t-foreach: deprecate x_(all|parity|even|odd)
These variables aren't used in Odoo and can be easily computed
anyway.

Also deprecate the support of integer values for t-foreach, for the
same reason.

closes odoo/odoo#33981

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-06-26 10:50:26 +00:00
Thomas Werland 515fb62fc4 [IMP] base_geolocalize,web_editor,doc: create map_view
In order for the map view to work properly:
- I moved scss property to a  file only scoped to website module.
- moved the definiton of "partner_latitude" and "partner_longitude" from
base_geolocalise to base/res.partner

closes odoo/odoo#32487

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-06-11 07:36:53 +00:00
Romain Derie 9813ee4eb8 [IMP] doc: adapt doc to new test asset and JS test file structure
Adapt doc to d7cd97a9b

closes odoo/odoo#33921

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-06-05 16:04:25 +00:00
MaxLarue 9c5dde8c53 [IMP] base,doc: add on_create and edit attribute on gantt view
related task #1929079

closes odoo/odoo#33872

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-06-03 19:39:42 +00:00
Christophe Simonis 825fee2626 [MERGE] forward port branch 11.0 up to d01db48087 2019-05-08 18:29:32 +02:00
Christophe Simonis d01db48087 [MERGE] forward port branch saas-15 up to 82f88478cf 2019-05-08 17:27:30 +02:00
Christophe Simonis 98b10f98bb [MERGE] forward port branch 10.0 up to a48318cb33 2019-05-08 17:09:40 +02:00
Yenthe666 8b76584892 [FIX] doc: fix typo in qweb documentation
closes odoo/odoo#32670

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-03 09:20:35 +00:00
Christophe Simonis 60e71302a3 [MERGE] forward port branch saas-12.2 up to 243a4ae5cb 2019-05-13 11:02:27 +02:00
Christophe Simonis 243a4ae5cb [MERGE] forward port branch saas-12.1 up to 330b99f60c 2019-05-10 15:20:01 +02:00
Christophe Simonis cc3a2c1bf3 [MERGE] forward port branch 12.0 up to e11bacfe51 2019-05-09 21:07:44 +02:00
Christophe Simonis f1d6a6108e [MERGE] forward port branch saas-11.3 up to 825fee2626 2019-05-09 11:12:22 +02:00
Laurent Smet bc131c0cfb [MERGE] manual forward port of accounting-pocalypse (beaa30a3d1)
This commit merges the following models
 * account.invoice and account.move
 * account.invoice.line and account.move.line
 * account.voucher and account.move
 * account.voucher.line and account.move.line

It was the opportunity for a big cleanup of the code, so it also restructures the whole account module, its different models/fields, the tests etc. for a better world and a better code readability.

==== Rationale ====
The rationale of this huge change is that we want journal entries / invoices to be easily edited, and changes reflected in the other model. It's a HUGE feature and very strategic for the fiduciary companies. For example, changing the account of a journal entry needs to be automatically reflected on the related invoice.

The same reasoning applies to sale/purchase vouchers.

==== Changes made in features =====
When creating an invoice, you are now creating a journal entry directly.
--> The object account.invoice no longer exists.
In the same fashion when creating an invoice line, you're now adding journal items directly in the journal entry representing the invoice. If this invoice line has some tax, it may create additional journal items as well.
--> The models account.invoice.line & account.invoice.tax no longer exist

Identically, when creating a sale/purchase receipt with its lines, you are now creating a journal entry directly and there's no more usability difference between encoding a receipt or an invoice.
--> The object account.voucher no longer exists.
--> The object account.voucher.line no longer exists.
--> The whole account_voucher module no longer exists.

Positive side-effects coming from these changes are
* draft invoices/bills/sale or purchase receipts now create a draft accounting entry. Validate these objects now simply post its journal entry. That means that draft invoices/bills/sale or purchase receipt can straightforwardly be included in reporting or budgets.
* opening a journal entry in form view will now always open the correct view: if it's a sale/purchase journal entry we will have a customer invoice/vendor bill view or a sale/purchase receipt view, whatever the menu we're coming from.
* code & business logic simplification. It is also condensed in a single place instead of being partially duplicated on invoices, vouchers and journal entries.

There should be no feature loss, except the one allowing to group multiple journal items together based on the same product during the invoice validation.

==== Changes made in models =====
* account.invoice: model removed. Instead, now use account.move with following mapping

field (account.invoice) 		field (account.move)
-----------------------			--------------------
name 					invoice_payment_ref
number 					name
reference 				ref
comment 				narration
user_id 				invoice_user_id
amount_					total_company_signed amount_total_signed
residual 				amount_residual
state 					state + invoice_payment_state 		/!\ selection changed
date_invoice 				invoice_date
date_due 				invoice_date_due
sent 					invoice_sent
origin 					invoice_origin
payment_term_id 			invoice_payment_term_id
partner_bank_id 			invoice_partner_bank_id
incoterm_id 				invoice_incoterm_id
vendor_bill_id 				invoice_vendor_bill_id
source_email 				invoice_source_email
vendor_display_name 			invoice_vendor_display_name
invoice_icon 				invoice_vendor_icon
cash_rounding_id 			invoice_cash_rounding_id
sequence_number_next 			invoice_sequence_number_next
sequence_number_next_prefix 		invoice_sequence_number_next_prefix

'invoices' subset of account.move can be accessed by using the selection field 'type' or one of the many helpers like is_invoice()

* account.move: now has a valid state 'cancel' that has to be excluded from all business logic
* account.move: field 'amount' renamed into 'amount_total'
* account.move: field 'reverse_entry_id' renamed into 'reversed_entry_id'
* account.move.line: now has a field 'display_type' that has to be excluded from all business logic, in order to support invoice layouting
* account.invoice.line: model removed. Instead, now use account.move.line with following mapping

field (account.invoice.line) 		field (account.move.line)
----------------------------		-------------------------
invoice_id 				move_id
uom_id 					product_uom_id
invoice_line_tax_ids 			tax_ids
account_analytic_id 			analytic_account_id

'invoice lines' subset of all account.move.line from a journal entry can be accessed by using the boolean field 'exclude_from_invoice_tab'

* account.invoice.tax: model removed. Instead, now use account.move.line with following mapping

field (account.invoice.tax) 		field (account.move.line)
---------------------------		-------------------------
invoice_id 				move_id
account_analytic_id 			analytic_account_id
amount 					price_unit
base 					tax_base_amount

'tax lines' subset of all account.move.line from a journal entry can be accessed by using the relational field 'tax_line_id'

* account.invoice.confirm: model removed. Instead, now use the 'post()' function of account.move
* account.invoice.refund: model removed. Instead, now use account.move.reversal to reverse the entries with the same options as we had for invoices
* account.voucher: model removed. Instead, now use account.move of type in ['out_receipt', 'in_receipt]
* account.voucher.line: model removed. Instead, now use account.move.line

==== Changes made in functions ====
* on account.move, method _run_post_draft_to_post() renamed into _autopost_draft_entries()
* on account.move, method action_account_invoice_payment() renamed into action_invoice_register_payment()
* on account.move, method action_invoice_reconcile_to_check() renamed into action_open_matching_suspense_moves()
* on account.move, method _get_domain_edition_mode_available() renamed into _get_domain_matching_supsense_moves()
* on account.move, method _get_intrastat_country_id() renamed into _get_invoice_intrastat_country_id()
* on account.move.line, method _get_domain_for_edition_mode() renamed into _get_suspense_moves_domain()
* in account.bank.statement, contextual key 'edition_mode' renamed into 'suspense_moves_mode'

Was task 1917430
2019-07-01 13:45:57 +02:00
Jinal PatelandMohammed Shekha 756aa60ecf [IMP] web, project: improve examples background on kanban quick create column
This commit makes the use of the kanban more intuitive by changing the view's
example background columns labels.

kanbanExamplesRegistry will have object as a value instead of array,
ghostColumns and examples will be the key where ghostColumns defines column
titles for example background on column quick create and examples will be array
of examples which will be displayed on click of See Examples link in quick
create column
If ghoseColumns are not defined then dynamically ghost columns will be generated
with titles like Column 1, Column2...

task- 1937198

closes odoo/odoo#30911

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>


Co-authored-by: Mohammed Shekha <msh@odoo.com>
2019-06-18 09:28:23 +00:00
Jeremy Kersten a80f1ddcda [FIX] doc: git guidelines, don't use # for task/opw
Use task-#xxx is wrong since it will refer to an unexising or wrong hash
of github.

closes odoo/odoo#33121

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-05-02 15:05:06 +00:00
Xavier Morel 10f1a1a0c4 [REM] multi from ir.actions.act_window
Task 1843603

* src_model is redundant with binding_model_id
* multi -> binding_view_types (if empty => all views) (maybe should be
empty by default yo?)
* in convert, type => rec.get(type) but no @type possible on <act_window>...
* removed deprecated auto_refresh & auto_search (not used anywhere (?))

closes odoo/odoo#24738

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-05-27 12:00:39 +00:00
Barad MahendraandMohammed Shekha 894b9f53dc [IMP] web: editable list view when no access rights
Currently, an editable list view (`editable` set) makes its cells editable. However, if
the attribute `edit=false` is set (from context key or from access right restriction.
See _postprocess_access_rights method of `ir.ui.view` for more details), the list view
should not be editable, but is still.

This commit makes the 'editable' property of the listview checking the `edit` attribute
and provides some tests.

Task-32612

closes odoo/odoo#21613

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>


Co-authored-by: Mohammed Shekha <msh@openerp.com>
2019-05-15 09:11:54 +00:00
Christophe Simonis 8dd5a85267 [MERGE] forward port branch saas-12.3 up to 60e71302a3 2019-05-13 15:26:12 +02:00
Hiral Bhavsar b2de618f9f [IMP] base,mail: allow to customize the activity view
The activity view has been greatly improved to allow to customize it
more easily. It works quite similarly to the kanban view, defining
`<field>` tags at the top and using these fields in the `<template>`
section. The template name used to define the activity cards is
`activity-box`.

Note that these activity cards are rendered using `KanbanRecord` widget
(this has implied that ActivityView inherits from `BasicView`).

Also note that the view validation has been moved in base to include the
common grammar.

Task 1894990
2019-05-03 10:19:40 +00:00
Aaron BohyandMartin Geubelle 9fbb4fb44f [IMP] web: editable list: table-layout: fixed
This rev. changes the layout of *editable* list views to a fixed
layout. This means that we are now responsible of the width of
each column. To do that, we associate with each field type a
factor, and the higher the factor is, the larger the column will
be (w.r.t. the others). This default value can be overriden in the
arch.

The fixed layout allows to remove the absolute positionning of
widgets inside editable lists (done in the next commit).

Part of task 1915702

Co-authored-by: Martin Geubelle <mge@odoo.com>
2019-04-02 11:55:57 +00:00
Martin Geubelle 015958dc17 [IMP] web,base: put buttons in list group headers
It is now possible to put buttons in the list view group headers.
When the view is grouped by a many2one field, those buttons
appear next to the header title when the group is opened.

The buttons are specified in the views in a <groupby> tag in the
list arch, with the following structure:
    <groupby name="groupedField"> <!-- must be a many2one -->
        <button type="object" name="my_method" string="Button1"/>
    </groupby>

It is also possible to add `field`, inside the `groupby` which can
be used for modifiers. These fields thus belong on the many2one
comodel, like:
    <groupby name="partner_id">
        <field name="name"/> <!-- name of partner_id -->
        <button type="object" name="my_method" string="Button1"
		attrs="{'invisible': [('name', '=', 'Georges')]}"/>
    </groupby>

These extra fields are fetched in batch when grouping on the field.

Part of task 1915702
2019-04-02 11:55:57 +00:00
Aaron Bohy 2be28d4d03 [IMP] web,board: enable pagination in grouped lists
With this rev., when there are a lot of groups in a grouped list
view, groups are displayed under several pages, whereas they were
all displayed in the same page before.

This is especially interesting with the new 'expand' attribute, to
ensure that we don't read records for a large number of groups.

By default, the groups limit is set to 80 (like records), and to 10
is the 'expand' attribute is set to true. This limit can be
overriden with the 'groups_limit' attribute.

Part of task 1915702
2019-04-02 11:55:57 +00:00