Hw should I leave the battery if I go away for one week?
For two weeks?
For a month?
Longer?
There's no need to do anything to an i3 being parked for 1 or 2 weeks.
If an i3 is parked for a month, what happens to the 12V battery depends on its condition. A fairly new 12V battery in good condition should not discharge so much that it would be damaged. However, older, weaker 12V batteries could discharge too much.
If the 12V battery is left connected and discharges below a certain voltage, the DC-DC converter could turn on for an hour to charge the 12V battery. I don't know whether this is documented anywhere, but several i3 owners with 12V system loggers on their i3's have shown this behavior. I don't depend on this happening when I've stored our i3's.
The HV battery pack is electrically disconnected from an i3 that is off, and it self-discharges at a very slow rate, ~1% per month in my experience.
Battery cell experts recommend storing a lithium ion battery cell at a ~50% charge level to minimize its degradation rate, especially at higher cell temperatures.
The i3
Owner's Manual recommends leaving an EVSE plugged in when storing an i3 for less than 3 months. I have never understood this recommendation because doing so doesn't do much. It would ensure that the HV battery pack's charge level remains at 100% which isn't best for long-term storage. The 12V battery is charged only when HV battery pack charging is active and then maybe up to 30 minutes after the HV battery pack charge level reaches 100%, so leaving an EVSE plugged in doesn't ensure that the 12V battery wouldn't discharge too much. Indeed, some i3 owners who left an EVSE plugged in during long-term storage reported dead 12V batteries as a result.
Because of all of this uncertainty, I have always disconnected the negative cable of the 12V battery when storing our i3's for periods from 3 to 9 months which I have done 8 times. The ensures that the HV battery pack could not be connected to the car so that nothing could discharge it. I have always stored our i3's with their charge levels 40% to 60% with the charge level decreasing only a few percentage during storage. I have never had any problems when returning and reconnecting the 12V battery. The 12V battery in the 2014 i3 that we bought new lasted over 7 years, so the storage procedure that I used must not have shortened its life.