Initial commit: Odoo 18.0-20251222 extra-addons
This commit is contained in:
17
web_widget_dropdown_dynamic/readme/CONTRIBUTORS.md
Executable file
17
web_widget_dropdown_dynamic/readme/CONTRIBUTORS.md
Executable file
@@ -0,0 +1,17 @@
|
||||
- [CorporateHub](https://corporatehub.eu/)
|
||||
|
||||
- Alexey Pelykh \<<alexey.pelykh@corphub.eu>\>
|
||||
|
||||
- [Therp BV](https://therp.nl/)
|
||||
|
||||
- Ronald Portier \<<ronald@therp.nl>\>
|
||||
|
||||
- Thanakrit Pintana \<<thanakrit.p39@gmail.com>\>
|
||||
|
||||
- [Trobz](https://trobz.com):
|
||||
|
||||
> - Son Ho \<<sonho@trobz.com>\>
|
||||
|
||||
- [Tecnativa](https://www.tecnativa.com):
|
||||
- Carlos Roca
|
||||
- `Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>`_
|
||||
2
web_widget_dropdown_dynamic/readme/CREDITS.md
Executable file
2
web_widget_dropdown_dynamic/readme/CREDITS.md
Executable file
@@ -0,0 +1,2 @@
|
||||
The migration of this module from 15.0 to 16.0 was financially supported
|
||||
by Camptocamp
|
||||
9
web_widget_dropdown_dynamic/readme/DESCRIPTION.md
Executable file
9
web_widget_dropdown_dynamic/readme/DESCRIPTION.md
Executable file
@@ -0,0 +1,9 @@
|
||||
Dynamic dropdown widget that supports resolving options from backend of:
|
||||
|
||||
> - `fields.Char`
|
||||
> - `fields.Integer`
|
||||
> - `fields.Selection`
|
||||
|
||||
**NOTE:** This widget is not intended to *extend* `fields.Selection`,
|
||||
but to filter selection values. For fully-dynamic set of options, use
|
||||
`fields.Char` instead.
|
||||
30
web_widget_dropdown_dynamic/readme/USAGE.md
Executable file
30
web_widget_dropdown_dynamic/readme/USAGE.md
Executable file
@@ -0,0 +1,30 @@
|
||||
``` python
|
||||
@api.model
|
||||
def method_name(self):
|
||||
values = [
|
||||
('value_a', 'Title A'),
|
||||
]
|
||||
if self.env.context.get('depending_on') == True:
|
||||
values += [
|
||||
('value_b', 'Title B'),
|
||||
]
|
||||
return values
|
||||
```
|
||||
|
||||
``` xml
|
||||
<field
|
||||
name="other_field"
|
||||
/>
|
||||
<field
|
||||
name="char_field"
|
||||
widget="dynamic_dropdown"
|
||||
options="{'values':'method_name'}"
|
||||
context="{'depending_on': other_field}"
|
||||
/>
|
||||
```
|
||||
|
||||
**DEMO**
|
||||
|
||||
On User defined filters added new field to show the feature, it is called
|
||||
**Dropdown Integer**. If any user selected just One option shoud appear, but if
|
||||
Mitchell Admin it should be possible to select option One and Two.
|
||||
Reference in New Issue
Block a user