From 6fcfefc83ec9441b515eba7d01caab9b703b60d5 Mon Sep 17 00:00:00 2001 From: Raf Geens Date: Tue, 8 Sep 2020 12:08:06 +0000 Subject: [PATCH] [FIX] doc: Truncate 680-line example data The page shows the first 15 lines of a CSV in raw form as an example. Next it shows the same data rendered as a table. However, it was displaying the entire 680-line source data. `csv-table` doesn't have a `:lines:` directive. I copied and truncated the original file for use in the documentation. X-original-commit: 04d4ec33043627747e36730953479557aae278f2 --- doc/reference/data.rst | 5 ++--- doc/reference/static/res.country.state.csv | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 doc/reference/static/res.country.state.csv diff --git a/doc/reference/data.rst b/doc/reference/data.rst index 3ab39f57484..09c8a61891c 100644 --- a/doc/reference/data.rst +++ b/doc/reference/data.rst @@ -286,14 +286,13 @@ For this case, data files can also use csv_, this is often the case for Here's the first lines of the data file defining US states ``res.country.state.csv`` -.. literalinclude:: ../../odoo/addons/base/data/res.country.state.csv +.. literalinclude:: static/res.country.state.csv :language: text - :lines: 1-15 rendered in a more readable format: .. csv-table:: - :file: ../../odoo/addons/base/data/res.country.state.csv + :file: static/res.country.state.csv :header-rows: 1 :class: table-striped table-hover table-condensed diff --git a/doc/reference/static/res.country.state.csv b/doc/reference/static/res.country.state.csv new file mode 100644 index 00000000000..b1960d9a4c5 --- /dev/null +++ b/doc/reference/static/res.country.state.csv @@ -0,0 +1,15 @@ +"id","country_id:id","name","code" +state_au_1,au,"Australian Capital Territory","ACT" +state_au_2,au,"New South Wales","NSW" +state_au_3,au,"Northern Territory","NT" +state_au_4,au,"Queensland","QLD" +state_au_5,au,"South Australia","SA" +state_au_6,au,"Tasmania","TAS" +state_au_7,au,"Victoria","VIC" +state_au_8,au,"Western Australia","WA" +state_us_1,us,"Alabama","AL" +state_us_2,us,"Alaska","AK" +state_us_3,us,"Arizona","AZ" +state_us_4,us,"Arkansas","AR" +state_us_5,us,"California","CA" +state_us_6,us,"Colorado","CO"