中国本土应用
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
845B

  1. For regular usage, see `Usage` below. This section is to clarify optional
  2. functionality to developers.
  3. To configure a model to use the Many2one style search field, make the model
  4. inherit from `date.range.search.mixin`:
  5. .. code-block::
  6. class AccountMove(models.Model):
  7. _name = "account.move"
  8. _inherit = ["account.move", "date.range.search.mixin"]
  9. This will make a `Period` field show up in the search view:
  10. .. figure:: https://raw.githubusercontent.com/OCA/server-tools/12.0/date_range/static/description/date_range_many2one_search_field.png
  11. :scale: 80 %
  12. :alt: Date range Many2one search field
  13. By default, the mixin works on the `date` field. If you want the mixin to work
  14. on a field with a different name, you can set a property on your model:
  15. .. code-block::
  16. _date_range_search_field = "invoice_date"
上海开阖软件有限公司 沪ICP备12045867号-1