|
| 1 | +# Fiscal Position Tax Mappings |
| 2 | + |
| 3 | +*Added in version 0.2.4.* |
| 4 | + |
| 5 | +This page documents how to use the manager and record objects |
| 6 | +for fiscal position tax mappings. |
| 7 | + |
| 8 | +## Details |
| 9 | + |
| 10 | +| Name | Value | |
| 11 | +|-----------------|--------------------------------| |
| 12 | +| Odoo Modules | Accounting | |
| 13 | +| Odoo Model Name | `account.fiscal.position.tax` | |
| 14 | +| Manager | `fiscal_position_tax_mappings` | |
| 15 | +| Record Type | `FiscalPositionTaxMapping` | |
| 16 | + |
| 17 | +## Manager |
| 18 | + |
| 19 | +The fiscal position tax mapping manager is available as the `fiscal_position_tax_mappings` |
| 20 | +attribute on the Odoo client object. |
| 21 | + |
| 22 | +```python |
| 23 | +>>> from openstack_odooclient import Client as OdooClient |
| 24 | +>>> odoo_client = OdooClient( |
| 25 | +... hostname="localhost", |
| 26 | +... port=8069, |
| 27 | +... protocol="jsonrpc", |
| 28 | +... database="odoodb", |
| 29 | +... user="test-user", |
| 30 | +... password="<password>", |
| 31 | +... ) |
| 32 | +>>> odoo_client.fiscal_position_tax_mappings.get(1234) |
| 33 | +FiscalPositionTaxMapping(record={'id': 1234, ...}, fields=None) |
| 34 | +``` |
| 35 | + |
| 36 | +For more information on how to use managers, refer to [Managers](index.md). |
| 37 | + |
| 38 | +## Record |
| 39 | + |
| 40 | +The fiscal position tax mapping manager returns `FiscalPositionTaxMapping` record objects. |
| 41 | + |
| 42 | +To import the record class for type hinting purposes: |
| 43 | + |
| 44 | +```python |
| 45 | +from openstack_odooclient import FiscalPositionTaxMapping |
| 46 | +``` |
| 47 | + |
| 48 | +The record class currently implements the following fields and methods. |
| 49 | + |
| 50 | +For more information on attributes and methods common to all record types, |
| 51 | +see [Record Attributes and Methods](index.md#attributes-and-methods). |
| 52 | + |
| 53 | +### `company_id` |
| 54 | + |
| 55 | +```python |
| 56 | +company_id: int |
| 57 | +``` |
| 58 | + |
| 59 | +The ID for the [company](company.md) this fiscal position tax mapping |
| 60 | +is associated with. |
| 61 | + |
| 62 | +### `company_name` |
| 63 | + |
| 64 | +```python |
| 65 | +company_name: str |
| 66 | +``` |
| 67 | + |
| 68 | +The name of the [company](company.md) this fiscal position tax mapping |
| 69 | +is associated with. |
| 70 | + |
| 71 | +### `company` |
| 72 | + |
| 73 | +```python |
| 74 | +company: Company |
| 75 | +``` |
| 76 | + |
| 77 | +The [company](company.md) this fiscal position tax mapping |
| 78 | +is associated with. |
| 79 | + |
| 80 | +This fetches the full record from Odoo once, |
| 81 | +and caches it for subsequent accesses. |
| 82 | + |
| 83 | +### `position_id` |
| 84 | + |
| 85 | +```python |
| 86 | +position_id: int |
| 87 | +``` |
| 88 | + |
| 89 | +The ID for the [fiscal position](fiscal-position.md) this mapping is part of. |
| 90 | + |
| 91 | +### `position_name` |
| 92 | + |
| 93 | +```python |
| 94 | +position_name: str |
| 95 | +``` |
| 96 | + |
| 97 | +The name of the [fiscal position](fiscal-position.md) this mapping is part of. |
| 98 | + |
| 99 | +### `position` |
| 100 | + |
| 101 | +```python |
| 102 | +position: FiscalPosition |
| 103 | +``` |
| 104 | + |
| 105 | +The [fiscal position](fiscal-position.md) this mapping is part of. |
| 106 | + |
| 107 | +This fetches the full record from Odoo once, |
| 108 | +and caches it for subsequent accesses. |
| 109 | + |
| 110 | +### `tax_src_id` |
| 111 | + |
| 112 | +```python |
| 113 | +tax_src_id: int |
| 114 | +``` |
| 115 | + |
| 116 | +The ID of the [tax](tax.md) to be overridden on products. |
| 117 | + |
| 118 | +### `tax_src_name` |
| 119 | + |
| 120 | +```python |
| 121 | +tax_src_name: str |
| 122 | +``` |
| 123 | + |
| 124 | +The name of the [tax](tax.md) to be overridden on products. |
| 125 | + |
| 126 | +### `tax_src` |
| 127 | + |
| 128 | +```python |
| 129 | +tax_src: Tax |
| 130 | +``` |
| 131 | + |
| 132 | +The [tax](tax.md) to be overridden on products. |
| 133 | + |
| 134 | +This fetches the full record from Odoo once, |
| 135 | +and caches it for subsequent accesses. |
| 136 | + |
| 137 | +### `tax_dest_id` |
| 138 | + |
| 139 | +```python |
| 140 | +tax_dest_id: int | None |
| 141 | +``` |
| 142 | + |
| 143 | +The ID of the [tax](tax.md) to override the source tax with, if set. |
| 144 | + |
| 145 | +### `tax_dest_name` |
| 146 | + |
| 147 | +```python |
| 148 | +tax_dest_name: str | None |
| 149 | +``` |
| 150 | + |
| 151 | +The name of the [tax](tax.md) to override the source tax with, if set. |
| 152 | + |
| 153 | +### `tax_dest` |
| 154 | + |
| 155 | +```python |
| 156 | +tax_dest: Tax | None |
| 157 | +``` |
| 158 | + |
| 159 | +The [tax](tax.md) to override the source tax with, if set. |
| 160 | + |
| 161 | +This fetches the full record from Odoo once, |
| 162 | +and caches it for subsequent accesses. |
0 commit comments