|
18 | 18 | from typing import TYPE_CHECKING, Annotated, Any, Literal, overload |
19 | 19 |
|
20 | 20 | from ..base.record.base import RecordBase |
21 | | -from ..base.record.types import ModelRef |
| 21 | +from ..base.record.types import FieldAlias, ModelRef |
22 | 22 | from ..base.record_manager.base import RecordManagerBase |
23 | 23 |
|
24 | 24 | if TYPE_CHECKING: |
@@ -88,6 +88,28 @@ class Product(RecordBase["ProductManager"]): |
88 | 88 | *Added in version 0.2.1.* |
89 | 89 | """ |
90 | 90 |
|
| 91 | + tax_ids: Annotated[list[int], FieldAlias("taxes_id")] |
| 92 | + """An alias for ``taxes_id``. |
| 93 | +
|
| 94 | + *Added in version 0.2.3.* |
| 95 | + """ |
| 96 | + |
| 97 | + taxes_id: Annotated[list[int], ModelRef("taxes_id", Tax)] |
| 98 | + """The list of IDs for the default taxes that are used |
| 99 | + when selling this product. |
| 100 | +
|
| 101 | + *Added in version 0.2.3.* |
| 102 | + """ |
| 103 | + |
| 104 | + taxes: Annotated[list[Tax], ModelRef("taxes_id", Tax)] |
| 105 | + """The list of default taxes used when selling this product. |
| 106 | +
|
| 107 | + This fetches the full records from Odoo once, |
| 108 | + and caches them for subsequent accesses. |
| 109 | +
|
| 110 | + *Added in version 0.2.3.* |
| 111 | + """ |
| 112 | + |
91 | 113 | uom_id: Annotated[int, ModelRef("uom_id", Uom)] |
92 | 114 | """The ID for the Unit of Measure for this product.""" |
93 | 115 |
|
@@ -366,4 +388,5 @@ def get_sellable_company_product_by_name( |
366 | 388 | # NOTE(callumdickinson): Import here to make sure circular imports work. |
367 | 389 | from .company import Company # noqa: E402 |
368 | 390 | from .product_category import ProductCategory # noqa: E402 |
| 391 | +from .tax import Tax # noqa: E402 |
369 | 392 | from .uom import Uom # noqa: E402 |
0 commit comments